On 2012-06-08 16:39, Paul_Koning at
Dell.com wrote:
On Jun 8, 2012, at 3:00 AM, Johnny Billquist wrote:
On 2012-06-08 08:39, Boyanich, Alastair wrote:
Hi Johnny,
Your welcome. Yes, it's pretty chatty. MIPSPro and DECC are my favourite
C compilers as they're quite anal and chatty warning wise.
Yeah. gcc is stupid. They added -Wall several years ago, but apparently people got upset
by it's anal reporting, so they dumbed it down. So -Wall does not turn on all warnings
anymore. And I just don't have the enery right now to figure out what more switches I
should throw on it to actually make it complain about everything...
If you really want lots of warnings, say -Wall -Wpedantic. But in fact -Wall is quite
good in more recent versions of gcc. The issues mentioned before would certainly be
caught by GCC 4.6 or later. Well, with one caveat: quite a number of the things that gcc
can warn about are found as a consequence of the deeper analysis done when you turn on
optimization. So you need at least -O1 and more likely -O2 if you want to get good
warnings.
Actually, I didn't get any warnings with -Wall, for which the mips compiler complained
about.
(Well, I had already fixed two issues, but the others gcc didn't complain about.)
Thanks, however. It was -Wpendantic that I was thinking of, even though I never seem to be
able to remember the name.
But I still think it is backwards to have a -Wall, which do not enable all warnings. :-)
Johnny