This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: a warning to implement
- From: dewar at gnat dot com (Robert Dewar)
- To: gdr at codesourcery dot com, tim at hollebeek dot com
- Cc: Dautrevaux at microprocess dot com, aoliva at redhat dot com, coola at ngs dot ru,dewar at gnat dot com, gcc at gcc dot gnu dot org, pcarlini at unitus dot it
- Date: Tue, 5 Feb 2002 22:19:47 -0500 (EST)
- Subject: Re: a warning to implement
<<That argument is flawed: there are plenty of warning not included in
-Wall and yet actually used by people.
>>
-Wall sounds to an uninitiated chap like me that it would turn on all
warnings. That sounds useful to me. I would be surprised to find that
there were useful warnings it did not turn on. Sure in some cases there
can be an argument to leave things out of -Wall, but I think that anything
that is clearly labeled as undefined in effect should be included in -Wall,
because really here the warning is that you are straying outside the
standard.
Of course not all warnings are about undefined constructs, some are about
constructs that are defined, but dubious, e.g. a statement that does
nothing at all. But for constructs that are clearly undefined, I think
-Wall should include warnings about them where possible.