[Issue 293] Expression uint.max + 1 yields 0 (zero)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 17 11:41:08 PDT 2006


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





------- Comment #2 from m.faustino at gmail.com  2006-08-17 13:41 -------
(In reply to comment #1)
> That's how fixed precision integer arithmetic works when it overflows. Not a
> bug.
> 

So why (u + 1) doesn't overflow when (uint.max + 1) does?
In the code I wrote, aren't those two expressions semantically equivalent?


-- 




More information about the Digitalmars-d-bugs mailing list