This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Criteria for a warning to be in -Wall? (was: Re: a warning to implement)
- From: Tim Hollebeek <tim at hollebeek dot com>
- To: Joe Buck <jbuck at synopsys dot com>
- Cc: tim at hollebeek dot com, Gabriel Dos Reis <gdr at codesourcery dot com>, Robert Dewar <dewar at gnat dot com>, aoliva at redhat dot com, gcc at gcc dot gnu dot org, phil at jaj dot com
- Date: Wed, 6 Feb 2002 15:19:44 -0500
- Subject: Re: Criteria for a warning to be in -Wall? (was: Re: a warning to implement)
- References: <20020206144901.A26491@pcp736370pcs.reston01.va.comcast.net> <200202062008.MAA05164@atrus.synopsys.com>
- Reply-to: tim at hollebeek dot com
On Wed, Feb 06, 2002 at 12:08:40PM -0800, Joe Buck wrote:
> Tim writes:
> > Let's discuss what the conditions should be for a warning to be in
> > -Wall, and then document it. If that ends up meaning -Wnested-externs
> > should be added, so be it.
>
> Many projects and development teams, both free and non-free, require
> clean compiles with -Wall. What this means is that if we put an option
> in -Wall, we are in a sense setting policy, the policy being that we
> are asserting rather strongly that "you shouldn't do that".
Which argues in favor of a documented set of criteria instead of an ad
hoc set of warnings. The criteria can be designed with this common
use in mind. In fact, it argues in favor of two I've mentioned before:
1) low false positive rate on "reasonable" code
2) avoidable by replacement with an equivalent construct
Once we all mostly agree what -Wall means, hopefully "x should/should
not be in -Wall" can be argued based on facts and principles, not
opinions.
-Tim