[LLVMbugs] [Bug 19757] Most negative integer greater than zero

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 15 12:14:07 PDT 2014


Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
(In reply to comment #0)
>   signed int final = -(signed int) n;

This negation has a signed integer overflow when '(signed int) n' is INT_MIN
(as it is in your case); your code has undefined behavior.

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/20140515/f6c03cde/attachment.html>

More information about the llvm-bugs mailing list