Integer overflow and underflow semantics?

Gary Willoughby via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 16 14:26:39 PDT 2014


This was asked a few years ago and i could find a definitive 
answer.

http://forum.dlang.org/thread/jo2c0a$31hh$1@digitalmars.com

On Saturday, 5 May 2012 at 04:57:48 UTC, Alex Rønne Petersen 
wrote:
> I don't think the language really makes it clear whether 
> overflows and underflows are well-defined. Do we guarantee that 
> for any integral type T, T.max + 1 == T.min and T.min - 1 == 
> T.max?

What is the current situation of integer overflow and underflow?


More information about the Digitalmars-d mailing list