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"


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


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