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

Ian Lance Taylor iant@google.com
Thu Jul 6 13:30:00 GMT 2006


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

> >Well, I explained why the warning is being emitted.
> >
> 
> Yes, because I haven't suppressed it with a switch .. but what I want
> to know is what the warning means.

There is a friendly manual which describes all the options.  Please
read it.

> TApplContextPtr CreateApplContext ();

-Wstrict-prototypes will issue a warning for this function declaration
because it is not a prototype.  An equivalent declaration with a
prototype would be:
  TApplContextPtr CreateApplContext (void);

Ian



More information about the Gcc-help mailing list