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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux