-Wmissing-prototypes is broken
Gerald Pfeifer
pfeifer@dbai.tuwien.ac.at
Thu Sep 10 05:41:00 GMT 1998
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/
More information about the Gcc-bugs
mailing list