This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -Wmissing-prototypes is broken


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/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]