c/3422: Parentheses eating

amodra@bigpond.net.au amodra@bigpond.net.au
Tue Jun 26 04:16:00 GMT 2001


>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:



More information about the Gcc-bugs mailing list