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"
- From: "John Yates" <jyates at netezza dot com>
- To: "Jay Vaughan" <jv at access-music dot de>, "Ian Lance Taylor" <iant at google dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 6 Jul 2006 09:28:27 -0400
- Subject: RE: trying to understand: "warning: function declaration isn't a prototype"
Ian Lance Taylor wrote:
>
> The warning means that the code does something like this:
> extern int foo ();
To which Jay Vaughan replied:
>
> yes, i understand this - i do not want to ignore this warning, i want
> to understand why the warning is emitted in the first place ..
I believe the issue is that empty parentheses do not constitute a valid
prototype and that to be truly conformant you would have to write:
extern int foo (void);
/john