This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/3422: Parentheses eating
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/3422: Parentheses eating
- From: amodra at bigpond dot net dot au
- Date: 26 Jun 2001 11:14:34 -0000
- Reply-To: amodra at bigpond dot net dot au
>Number: 3422
>Category: c
>Synopsis: Parentheses eating
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 26 04:16:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Alan Modra
>Release: 3.0, current mainline, 2.95.2
>Organization:
>Environment:
irrelevant
>Description:
The following code emits this warning
warn.c: In function `foo':
warn.c:3: warning: suggest parentheses around && within ||
>How-To-Repeat:
cat > warn.c <<EOF
int foo (int a, int b)
{
return (a && b && 1) || 0;
}
EOF
gcc -Wall -c warn.c
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: