[LLVMbugs] [Bug 2729] Overflow in constant expressions not caught
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jan 16 12:53:22 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=2729
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
CC| |richard-llvm at metafoo.co.uk
Resolution|--- |FIXED
--- Comment #14 from Richard Smith <richard-llvm at metafoo.co.uk> ---
(In reply to comment #13)
> I think the bug is still there. I have the following code
>
> char g = 0x8FL;
With -Weverything, I get:
<stdin>:1:10: warning: implicit conversion changes signedness: 'long' to 'char'
[-Wsign-conversion]
char g = 0x8fL;
~ ^~~~~
Anyway, there's no overflow in this code; there's a conversion from 'long' to
'char', which has an implementation-defined result, which for us is a 2s
complement reduction.
--
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/20140116/741aa4fa/attachment.html>
More information about the llvm-bugs
mailing list