[LLVMbugs] [Bug 5297] New: Wwarn about operator precedence with &/==

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Oct 24 13:28:44 PDT 2009


           Summary: Wwarn about operator precedence with &/==
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: new-feature
          Severity: minor
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dgregor at apple.com
                CC: llvmbugs at cs.uiuc.edu

blackthorn:clang dgregor$ cat t.c
int f(unsigned x) {
  if (x & 0x01 == 0)
    return 0;

  return 1;

blackthorn:clang dgregor$ gcc -Wall -fsyntax-only t.c
t.c: In function ‘f’:
t.c:2: warning: suggest parentheses around comparison in operand of &
blackthorn:clang dgregor$ clang -Wall -fsyntax-only t.c

for some motivation.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list