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.
paul
Show replies by date