[LLVMbugs] [Bug 10703] no warning for << versus + precedence confusion

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 5 14:56:16 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=10703

rtrieu at google.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dblaikie at gmail.com,
                   |                            |rtrieu at google.com
         Resolution|                            |FIXED

--- Comment #1 from rtrieu at google.com 2012-10-05 16:56:16 CDT ---
David Blaikie fixed this in r165283 by introducing -Wshift-op-parentheses.

warning: '-' within '<<' [-Wshift-op-parentheses]
int x = y << 8 - z << 0;
          ~~ ~~^~~
note: place parentheses around the '-' expression
      to silence this warning
int x = y << 8 - z << 0;
               ^
             (    )

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