This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-Wstrict-prototypes and void foo () {}
- From: Doug Evans <dje at transmeta dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 5 May 2003 15:30:11 -0700
- Subject: -Wstrict-prototypes and void foo () {}
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.