[Issue 293] Expression uint.max + 1 yields 0 (zero)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 17 11:56:14 PDT 2006
http://d.puremagic.com/issues/show_bug.cgi?id=293
------- Comment #3 from bugzilla at digitalmars.com 2006-08-17 13:56 -------
u+1 adds 1 to a ulong, which does not overflow because it's a 64 bit type which
is large enough to represent 4294967296. uint.max+1 is a uint, which does
overflow because it's a 32 bit type and not large enough to hold 4294967296.
The expressions are not semantically equivalent.
--
More information about the Digitalmars-d-bugs
mailing list