[LLVMbugs] [Bug 22899] false negative of -Winteger-overflow

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 15 18:38:52 PDT 2015


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

Davide Italiano <davide at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |davide at freebsd.org
         Resolution|---                         |FIXED

--- Comment #1 from Davide Italiano <davide at freebsd.org> ---
Can't repro on recent clang, seems fixed.


% ./clang conv.c -Wconversion
conv.c:3:30: warning: overflow in expression; result is -445703536 with type
'int' [-Winteger-overflow]
  int a = ((uint16_t)0xE570L * (uint16_t)(-1L));
                             ^
conv.c:5:26: warning: overflow in expression; result is -445703536 with type
'int' [-Winteger-overflow]
  b = ((uint16_t)0xE570L * (uint16_t)(-1L));
                         ^
2 warnings generated.

-- 
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/20150416/c9a43d82/attachment.html>


More information about the llvm-bugs mailing list