Rename -W to -Wextra ?

Wheeler, Fred (Research) wheeler@crd.ge.com
Fri Nov 1 06:40:00 GMT 2002


> -----Original Message-----
> From: gcc list [mailto:gcc@gcc.gnu.org]
> Sent: Thursday, October 31, 2002 7:39 PM
> To: Fergus Henderson
> Cc: Mike Stump; Wheeler, Fred (Research); Phil Edwards
> Subject: Re: Rename -W to -Wextra ?
> 
> > On 03-Jun-2002, mike stump <mrs@windriver.com> wrote:
> > > > From: "Wheeler, Fred (Research)" <wheeler@crd.ge.com>
> > > > To: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>
> > > > Cc: "'phil@jaj.com'" <phil@jaj.com>
> > > > Date: Mon, 3 Jun 2002 10:07:20 -0400 
> > > 
> > > > I think -Wallall should add absolutely every -W* option 
> that exists
> > > > now or is added in the future.
> > > 
> > > I am more interested in a survey of 20 people that have 
> large projects
> > > that tried to use such an option and whether they thought 
> there was
> > > any use for it.
> 
> On Wed, 2002-10-30 at 20:33, Fergus Henderson wrote:
> 
> > Even if this option were not useful in large projects, it 
> would still be
> > useful when invoking gcc by hand on small code samples, IMHO.
> 
> Unfortunately some of the warning options are brain-damaged, e.g.
> -Weffc++.  The "Effective C++" warnings are ill-considered, and will
> generate tons of warnings on any code that uses the STL.

The -Wallall option will still be handy when used with some -Wno-* options.  If you don't like
-Weffc++, you can use "-Wallall -Wno-effc++".  The -Wallall option would give the user the ability to
say to the compiler: "use all of the warning options you have, except those I explicitly turn off".
This will be useful when switching between compiler versions, since new warning options get added.

Another issue is how to handle -W options that take an "argument".  I would propose including options
such as -Wid-clash-8 and -Wlarger-than-256 in the -Wallall option, with some guess at a popular
setting.  The setting could then be changed after using the -Wallall option by explicitly using the
-Wid-clash-N or -Wlarger-than-N option.

-Fred Wheeler



More information about the Gcc mailing list