On Thu, Apr 5, 2012 at 4:51 AM, Richard Guenther <richard.guent...@gmail.com> wrote: > On Thu, Apr 5, 2012 at 11:46 AM, Gabriel Dos Reis > <g...@integrable-solutions.net> wrote: >> On Thu, Apr 5, 2012 at 4:39 AM, Richard Guenther >> <richard.guent...@gmail.com> wrote: >> >>> Btw, it would be more reasonable to enable a subset of warnings that >>> we enable at -Wall by default. >> >> Which ones for example? >> >> Here is a (partial) list: >> -Wformat >> -Wchar-subscripts >> -Wmissing-braces >> -Wparentheses >> -Wreturn-type >> -Wsequence-point >> -Wstrict-aliasing >> -Wswitch >> -Waddress >> -Wstrict-overflow >> -Warray-bounds >> -Wvolatile-register >> -Wunknown-pragmas >> -Wuninitialized >> -Wmaybe-uninitialized >> -Wmain >> -Wenum-compare >> -Wsign-compare >> -Wreorder >> -Wc++0x-compat >> -Wnarrowing >> -Wtrigraphs >> -Wcomments >> -Wpointer-sign > > Are there more specific requests than "enable -Wall by default"?
The simpler requests are -Wall by default. (there are some occasional -pedantic). The ones I've heard in person -- with the requesters quite competent and respectable programmers -- are in less polite words what I can possibly convey in this discussion. Adding more options isn't on the top of the list (to quote "I can't go through the 10000 options to figure out which ones will work for something this obvious that should be done by default.") > Are > there requests to remove some options from -Wall? Are there requests > to add some options to -Wall? > > Note that some of the above depend on optimization flag settings > (and optimization happening). I think I have long registered my opinion that diagnostics should not depend on optimizations. We had had that discussion in the past and I know we have differing opinions; I am not opening that particular discussion now. What I would like to say is that if a warning is effective only when optimization is turned on, it does not hurt that it enabled by default even if -On levels would make it more effective. I am not going to fight on that though. > Those are not good candidates - I think > good candidates are those that would still be fully operational with > -fsyntax-only. > > Richard.