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

Eli Friedman <efrie...@codeaurora.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 CC|                            |efrie...@codeaurora.org

--- Comment #1 from Eli Friedman <efrie...@codeaurora.org> ---
Tried compiling your testcase with -fsanitize=undefined; ubsan says:

<stdin>:109:22: runtime error: signed integer overflow: 2147483647 -
-2147483648 cannot be represented in type 'int'

We make no guarantees about the behavior of code with undefined behavior.  See
also http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html . 
 (For signed integer overflow in particular, you can use the flag -fwrapv to
make it have defined behavior.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to