unsigned interger overflow

Jonathan M Davis jmdavisProg at gmx.com
Wed Oct 2 02:38:11 PDT 2013


On Wednesday, October 02, 2013 11:15:00 monarch_dodra wrote:
> Last time I read TDPL, I *seem* to remember that it stated that D
> targeted *exclusively* 2's complement architechture. So I'd
> conclude that, even if it is not *specified*, the only logical
> behavior for signed under/over flow, is to jump from from .min to
> .max

Yes. Unlike in C++, overflow for signed integers is defined in D, but obviously 
that's from max to min and not to max to 0 - though I suppose that it's also 
from max to min for uint; it's just that uint.min is 0.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list