This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Rename -W to -Wextra ?
- From: "Wheeler, Fred (Research)" <wheeler at crd dot ge dot com>
- To: "'gcc list'" <gcc at gcc dot gnu dot org>, Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Cc: Mike Stump <mrs at windriver dot com>, Phil Edwards <phil at jaj dot com>
- Date: Fri, 1 Nov 2002 09:39:31 -0500
- Subject: RE: Rename -W to -Wextra ?
> -----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