Re: Problem when using optimization on aix 5.2 and gcc 4.1.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux