Problem when using optimization on aix 5.2 and gcc 4.1.1
John Love-Jensen
eljay@adobe.com
Tue May 22 12:25:00 GMT 2007
Hi Thomas,
> Compiling with -Wall is not easy for us right now, too. There simply are
> too many!! :-(
Hmmmm.
This sounds like to me, "We can't turn on -Wall to help us debug our code,
because it points out that our code is full of too many bugs."
Granted, in my experience, only about 1-out-of-10 warnings is a bug, and the
other 9 cases is something the compiler identifies as suspicious coding
practice or non-portable coding practice (but which is perfectly fine on the
particular platform).
At the moment, on my home C++ projects, I turn on ALL warnings (and
-pedantic-error and -Werror and -Wfatal-errors) and then explicitly disable
these warnings that I've determined are undesirable for my code:
-Wno-aggregate-return
-Wno-four-character-constants
-Wno-long-long
-Wno-unreachable-code
(I wish GCC had a "turn on *ALL* warnings" flag, since -Wall only turns on a
select subset of the more popular warnings. And then I could subsequently
disable the warnings as desired. Alas, my feature request has been
rejected. *sigh* So my Makefile g++ command lines are very, very, very,
very, very, very, very, very, very, very, very, very, very, very long.)
Sincerely,
--Eljay
More information about the Gcc-help
mailing list