This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -Wmissing-prototypes is broken
- To: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Subject: Re: -Wmissing-prototypes is broken
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 09 Sep 1998 12:27:27 -0600
- cc: egcs-bugs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.GSO.4.03.9809091740200.24901-100000@markab.dbai.tuwien.ac.at
>you write:
> The docs say
>
> -Wmissing-prototypes'
> Warn if a global function is defined without a previous prototype
> declaration. This warning is issued even if the definition itself
> provides a prototype. The aim is to detect global functions that
> fail to be declared in header files.
>
> but even for the trivial program
>
> void f(int i) {
> i++;
> }
>
> it does not seem to work like that:
Seems to work for me:
gcc -Wmissing-prototypes foo.c -c
foo.c:1: warning: no previous prototype for `f'
[law@ralph /usr/tmp/egcs/gcc] gcc -v
Reading specs from /usr/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
I also get the error with the mainline sources.
jeff