[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


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