[llvm-bugs] [Bug 32296] New: Missing diagnostic for "-(1<<31)"

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 15 18:33:36 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32296

            Bug ID: 32296
           Summary: Missing diagnostic for "-(1<<31)"
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: efriedma at codeaurora.org
                CC: llvm-bugs at lists.llvm.org

Testcase:

int a = -(1<<31);

This is UB; we should warn by default.  (clang does warn for "0-(1<<31)".)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170316/d0c9b582/attachment.html>


More information about the llvm-bugs mailing list