[LC++]Re: g++ 3.0 warning messages
Bernhard Josef Rieder
bernhard at ratte.dhs.org
Sat Jul 28 04:07:10 UTC 2001
On Fri, Jul 27, 2001 at 01:45:24PM -0400, Jack Lloyd wrote:
> While nice in theory I think you're expecting too much (also, these are
> not errors, but warnings). For example... try using -Weffc++ sometime.
> Additionally (I really don't mean to be a jerk here, though I guess I am):
> libstdc++ is a volunteer project. If you would like it for it to build
> without warnings, you should provide the project with patches.
I do not think you are a jerk 'cause you're right (in some ways). If i
find someone whining about some bad thing in apiece of software I also
tell him to accept it or to make it better but stop whining.
So I can life with it. I am not whinig (oh, this is so bad. Someone
please fix it, ...) I am just asking if there is away to prevent this
messages. If not then it's ok. I just don't like warnings by foreign
code. I produce enough of them ;-)
> Well... it does seem like these warnings are all from -Wshadow (the other
> warnings you're using, like pointer-arith, write-strings, and cast-*
> really should be in -Wall IMO, so any of those being set off by the
> standard libraries would probably constitute a real problem).
No they're not:
man g++-3.0 says:
The remaining `-W...' options are not implied by `-Wall' because they
warn about constructions that we consider reasonable to use, on
occasion, in clean programs.
This warnings not in -Wall include:
traditional, shadow, id-clash-len, pointer-arith, cast-qual, cast-align,
write-strings, conversion, aggregate-return, strict-prototypes,
missing-prototypes, missing-declarations, redundant-decls,
nested-externs, enum-clash, long-long, overloaded-virtual, inline
BTW: what is wrong with aggregate-return, Except that it makes
a (unnecessary?) call to the constructor and doesn't g++ provide
a pragma or something to prevent this?
Bernhard Rieder & Nagetiere: /""\ __ _,-""-.
bernhard at ratte.dhs.org / `.o\ (0)),-" .-.'.
Ratte - Mailingliste: /o O o) :-"o ,__/,__( :*'^'-.__.-'
ratte at ratte.dhs.org /o_.--_( "^---'---'------'"
More information about the tuxCPProgramming