This is the mail archive of the gcc@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]
Other format: [Raw text]

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.
> 
> I would be more interested in you trying out such an option, and then
> telling us how wonderful and beneficial it is, and how it helped you.

A long time ago, I wrote a small script that invoked gcc (2.8?)
with all warning options enabled except the following:

# -Wredundant-decls     causes too many complaints in system header files
# -Wconversion          really only intended to help people using `unprotoize'
# -Waggregate-return    not useful, IMHO
# -Wenum-clash          doesn't work with gcc 2.7.x                             

This script has been widely used.  For the Mercury project, I used a
variant of this script, which disabled some additional warnings.

If `-Wallall' existed, I would use it.  I would not use `-Wallall' on its
own; instead I would use it in combination with the appropriate options
to disable warnings which were more trouble than they are worth, e.g.
`-Wallall -Wno-conversion -Wno-aggregate-return'.  But I very much prefer
this model of starting with all warnings enabled and then disabling the
ones that cause trouble.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


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