gcc function signature
Segher Boessenkool
segher@kernel.crashing.org
Mon Mar 1 17:22:00 GMT 2010
> in one of the header file I have this declaration
>
> toto.h
> extern int hkl_pseudo_axis_engine_init_func(HklPseudoAxisEngineMode
> *mode,
> HklPseudoAxisEngine *self,
> HklGeometry *geometry,
> HklDetector const *detector,
> HklSample const *sample)
>
> but in the
> toto.c I had
>
> int (HklPseudoAxisEngine *self,
> HklGeometry *geometry,
> HklDetector const *detector,
> HklSample const *sample)
> {
> }
>
>
> and gcc did not complain during the compile time about this is it
> normal.
You should do
#include "toto.h"
in toto.c . You can use -Wmissing-declarations yo warn about all places
where you forgot to do that (or where you have something needlessly
global).
Segher
More information about the Gcc-help
mailing list