I was wondering about little differences between declaration of function prototypes in headers and in .c files. I have a header with some prototype functions and a some .c files with real implementation of these functions. I made some changes in the header, only added "__restrict" qualifier (recognized by gcc). My question is do I have to put the "__restrict" qualifier in .c files to (currently the code compile so I guess the answer is no, but some precision would be appreciated).
Does this work for every C qualifier? Can I add some "const" or "volatile" in header without having to do the same in .c files?
currently in header :
int myfunc_gettype (const mytype *__restrict, int *__restrict);
and in implementation file :
int myfunc_gettype(const mytype *attr, int *type)