This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/3422: Parentheses eating



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]