This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -Wmissing-prototypes is broken
- To: egcs-bugs at cygnus dot com
- Subject: Re: -Wmissing-prototypes is broken
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Date: Thu, 10 Sep 1998 14:40:43 +0200 (MET DST)
- cc: Jeffrey A Law <law at cygnus dot com>
On Wed, 9 Sep 1998, Jeffrey A Law wrote:
>> void f(int i) {
>> i++;
>> }
> Seems to work for me:
>
> gcc -Wmissing-prototypes foo.c -c
> foo.c:1: warning: no previous prototype for `f'
> [...]
> I also get the error with the mainline sources.
Ahh, I just realized that this is specific to g++ resp. the C++ frontend.
markab[232]:~% gcc -Wmissing-prototypes foo.c -c
foo.c:1: warning: no previous prototype for `f'
markab[233]:~% g++ -Wmissing-prototypes foo.c -c
markab[233]:~% gcc -Wmissing-prototypes foo.cc -c
markab[234]:~% /sw/swtest/egcs/bin/g++ -v
Reading specs from /sw/swtest/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.92.04/specs
gcc version egcs-2.92.04 19980909 (gcc2 ss-980609 experimental)
According to my reading of the docs, however, this is not a C-only warning.
Gerald
--
Gerald Pfeifer (Jerry) Vienna University of Technology
pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/