This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
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