A
Aad Rijnberg
Hi,
I had an unexpected problem with the following situation:
- a header file defining a prototype of a function:
void myfun(int * const x);
- a source file defining the implementation:
void myfun(int * x)
{
:
}
I would have expected that the compiler (gcc) warns that the qualifier in
the prototype and the implementation were different, but it does not. Is
there a compiler switch to turn this checking on? I tried
-pedantic, -Wcast-qual and -Wstrict-prototypes, but to no avail.
Any hints would be appreciated.
Aad Rijnberg
I had an unexpected problem with the following situation:
- a header file defining a prototype of a function:
void myfun(int * const x);
- a source file defining the implementation:
void myfun(int * x)
{
:
}
I would have expected that the compiler (gcc) warns that the qualifier in
the prototype and the implementation were different, but it does not. Is
there a compiler switch to turn this checking on? I tried
-pedantic, -Wcast-qual and -Wstrict-prototypes, but to no avail.
Any hints would be appreciated.
Aad Rijnberg