This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Disabling warning: suggest parentheses around && within ||
- From: Andrew Haley <aph at redhat dot com>
- To: Andre Majorel <aym-ccg at teaser dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 09 May 2009 09:45:02 +0100
- Subject: Re: Disabling warning: suggest parentheses around && within ||
- References: <20090509071954.GL29862@aym.net2.nerim.net>
Andre Majorel wrote:
> Is there a way to have -Wall without all the
> "warning: suggest parentheses around && within ||" noise ?
>
This is amazing. I have only ever seen that warning on a few occasions,
and it's always been right. I can't imagine what your code might look
like!
> -Wno-parentheses works, and seems to be supported at least as far
> back as GCC 2.95, but probably also disables other, potentially
> useful, warnings.
It doesn't. I just looked at the gcc source, and -Wno-parentheses
only affects "suggest parentheses around X in Y" warnings.
Why don't you just put the parentheses in? It's good advice.
Andrew.