Re: GCC: How to get all warnings?

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

 



On 10 August 2011 09:10, Jeffrey Walton wrote:
> This is probably going to sound like a dumb question, but here goes:
> why doen't GCC offer a switch to enable all warnings? And even better,

Noone has implemented it, gcc devs don't think it's useful (or not
more useful than fixing bugs or adding more useful features first, and
don't want to have to maintain it) and apparently noone else wants it
badly enough to do more than open bugzilla reports requesting it.

It probably wouldn't be useful to many people, even the people who
think they want it.

e.g. do you really want to enable -Wdouble-promotion ?
That's useful for people writing for targets without efficient
'double' operations in hardware, but pretty useless for everyone else.

       The following -W... options are not implied by -Wall.  Some
       of them warn about constructions that users generally do not
       consider questionable, but which occasionally you might wish
       to check for; others warn about constructions that are nec-
       essary or hard to avoid in some cases, and there is no sim-
       ple way to modify the code to suppress the warning.


> Why was -Wall named -Wall - wouldn't -Wsome be better?

History, I guess.  It's too late to change it, if -Wall suddenly
enabled *all* warnings then millions of makefiles using -Wall would
produce spurious warnings and -Wall would have to be removed from
those makefiles, which would be a much bigger problem for a far larger
number of people than the few who think that -Wall should enable
literally all warnings.  It's a misnomer, but so what?


[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