-Wstrict-prototypes and void foo () {}
Doug Evans
dje@transmeta.com
Mon May 5 22:30:00 GMT 2003
The docs for -Wstrict-prototypes say
Warn if a function is declared or defined without specifying the
argument types. (An old-style function definition is permitted without
a warning if preceded by a declaration which specifies the argument
types.)
I wonder if an exception to the "if preceded ..." clause can be made
for function definitions with no arguments.
Having to go and change lots of function definitions from
void
foo ()
{
// mumble ...
}
to
void
foo (void)
{
// mumble ...
}
is a pain _and_ an eyesore.
More information about the Gcc
mailing list