This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -Wparentheses lumps too much together
- From: Ian Lance Taylor <iant at google dot com>
- To: jklowden at freetds dot org
- Cc: gcc at gnu dot org
- Date: 19 Dec 2007 14:58:04 -0800
- Subject: Re: -Wparentheses lumps too much together
- References: <20071219200235.GA21525@oak.schemamania.org>
jklowden@freetds.org writes:
> Much as I'm a fan of the GCC and rely on -Wall, I would like to suggest
> to you that -Wparentheses should be split up, and things it checks/suggests
> be moved out of -Wall. If this is not the right forum or if you'd rather
> see this as a bug report, I'm happy to go where I'm pointed.
I have no objection to splitting -Wparentheses into separate warnings
controlled by separate options.
> My specific candidate for exclusion from -Wall is this one:
>
> if (a && b || c && d)
>
> which yields (as you know) advice to parenthesize the two && pairs.
That particular warning happened to find dozens of real errors when I
ran it over a large code base. It may be noise for you, but I know
from personal experience that it is very useful.
Ian