Hardware Traps for Integer Overflow

Tobias Pankrath via Digitalmars-d digitalmars-d at puremagic.com
Thu May 29 13:01:23 PDT 2014


On Thursday, 29 May 2014 at 15:32:54 UTC, Wanderer wrote:
> I don't see any valid alternatives. What should ideally happen 
> if you increment 0xFFFF..FFFF? Should the value remain the same?

I know at least one firmware running in cars from several 
manufacturers where
this is the desired behavior in dozens of places. Saturated 
arithmetic is common.

(I'm not saying it should be the default)


More information about the Digitalmars-d mailing list