This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch for Re: Inappropriate Warning Cannot Be Turned Off


> Nathan Sidwell wrote in various messages:
> > Also, the meaning should be something like
> >         "Do not warn about confusing and commonly misunderstood
> >         parts of the standard"
> > [perhaps the sense should be inverted, and the flag on by default]
> > 
> > That way we can augment other parts of the compiler too.  It shouldn't
> > go into -Wall, as those warning (which I happen to like), can be turned
> > off by suitable reworking of the source code.
> 
> I agree with all that, but especially that the sense should be inverted.
> When you say `-Wwhatever' it implies that you are turning warnings *on*,
> which isn't what's happening here.
> 
> > It just occurred to me that this should be called
> >         -Wlanguage-lawyer
> 
> Oh, I do like that :-), but I think the non-default option to suppress
> the message needs to be of the form `-Wno-something'.  My suggestion is
> 
> `-Wno-explications'
>      Inhibit warnings about confusing and commonly misunderstood parts
>      of the standard.

As a humble user of the compiler, I'd like to voice my support for
this variant.

However, since in the future there may be more confusing and commonly
misunderstood parts of the standard the compiler wants to report about,
I suggest an additional flag -Wno-explications-<whatever> to turn off
this particular one.

And while we're on the subject of warning flags, since I like the compiler
to be very strict, I pass it the following list of warning flags (takes
a deep breath):

WFLAGS = -W -Wall -pedantic -ansi \
 -Wtraditional -Wshadow -Wpointer-arith -Wbad-function-cast \
 -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual \
 -Wstrict-prototypes -Wsynth -Wsign-compare

The first line of flags is obviously necessary, but I would really like
to see a lot of the other flags moved under -Wall, or perhaps under a
new flag -Wstrict.

I've even considered submitting a patch for this, but I'm not so sure
it would be welcomed. The gcc developers seem to like it the way it
is now.



-- 
Kees van Reeuwijk, Delft University of Technology
http://www.pds.twi.tudelft.nl/~reeuwijk

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]