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

Ian Lance Taylor iant@google.com
Wed Jul 5 16:39:00 GMT 2006


Jay Vaughan <jv@access-music.de> writes:

> gcc: gcc version 2.95.3 20010315 (release)
> 
> i get these warnings on a project i'm trying to port using
> arm-linux-gcc .. is there some place i can find a more detailed
> description of what these warnings mean and how i can clean them up? i
> am having problems with my project and suspect that it is related to
> these prototypes being mis-handled as the function declaration,
> instead of just being handled as a prototype ..

The warning means that the code does something like this:
    extern int foo ();

The warning message will include a file name and line number you can
use to see where this is happening.

You can turn off the warning with -Wno-strict-prototypes (or simply by
omitting -Wstrict-prototypes).

Ian



More information about the Gcc-help mailing list