[LLVMbugs] [Bug 9651] New: -Wshift-overflow should show the shift result in hex

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 7 16:18:54 PDT 2011


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

           Summary: -Wshift-overflow should show the shift result in hex
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zhanyong.wan at gmail.com
                CC: llvmbugs at cs.uiuc.edu


-Wshift-overflow is awesome.  There's room for improving its message though. 
Example:

       foo.cc:2908:58: error: shift result (36893488143124135936) requires 66
bits to represent, but 'long long' only has 64 bits [-Werror,-Wshift-overflow]

Knowing the value in decimal isn't very helpful here.  Since 'shift' means
'multiply/divide by power of 2', we should print the shift result in hex such
that the user can easily see what the bits are.

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