C++: ignore -Wstrict-prototypes, not -Wno-strict-prototypes

Jason Merrill jason@cygnus.com
Sat Jun 24 09:10:00 GMT 2000


>>>>> Zack Weinberg <zack@wolery.cumb.org> writes:

 > On Tue, Jun 20, 2000 at 11:10:20PM -0400, Jason Merrill wrote:
 >> Zack Weinberg <zack@wolery.cumb.org> writes:
 >> 
 >> > The C++ front end currently ignores -W(no-)missing-prototypes and
 >> > complains about -W(no-)strict-prototypes.  Both these warning
 >> > categories are always on in C++.
 >> 
 >> No, -Wmissing-prototypes means "complain if we see a definition
 >> without a previous prototype", which is not always on in C++.

 > warn_missing_prototypes is set in decl2.c but is referenced nowhere
 > else in the C++ compiler.  Perhaps this means the warning is always
 > _off_; I confess I can't find any code that would generate it.

Then the C++ compiler probably never generates the warning.  Which is not
to say that it wouldn't potentially be useful to do so, though it certainly
wouldn't be as useful as it is in C.

Jason


More information about the Gcc-patches mailing list