This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: trying to understand: "warning: function declaration isn't a prototype"


Am Donnerstag, 6. Juli 2006 13:32 schrieb Ingo Krabbe:
>
> You might look at the results of the prototyping you can choose gcc -E
> some_file.c and see the result:
>
> I attached xy.c.  The result of
>
> gcc -E xy.c | grep "typedef.*AbcPtr"             is
> typedef void * AbcPtr;
>
> which seems to be ok.
>
> You should lookup if the definitions above are somehow hidden by
> conditionals, which you also can control via gcc -E.

Ah and I even could reproduce your warning message, but it wasn't that easy 
since gcc -Wall -Wextra -pedantic -ansi xy.c gives no warning.  So I had to 
turn on -Wstrict-prototypes.  The warning vanishes when you write:

TApplContextPtr CreateApplContext (void);
                                   ^^^^   the void here makes the difference



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]