[Issue 4835] DMD should warn about integer overflow in computed constant

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 26 11:50:06 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=4835


Luís Marques <luismarques at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luismarques at gmail.com


--- Comment #5 from Luís Marques <luismarques at gmail.com> 2013-03-26 11:50:04 PDT ---
(In reply to comment #4)

For completeness, it also does not have a problem (like in your example) where
the initializer of the 64-bit variable is initialized with (what is not
obvious) a folded and truncated 32-bit int:

    var x uint64 = 4 * 1024 * 1024 * 1024;
    // x is now 4294967296, not 0.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list