On 3/26/13 1:56 PM, "Luís Marques" <[email protected]>" wrote:
BTW, as far as I can see the overflow/underflow behavior never got
specified by the language, in any case:

1) http://forum.dlang.org/thread/[email protected] <-- no
conclusion

2) Andrei's book doesn't seem to mention the topic.

If it is specified somewhere please do tell. Whatever the behavior
should be (unspecified, modulus for unsigned integers, etc) there really
should be an official stance.

D obeys two's complement overflow rules for its signed and unsigned arithmetic. TDPL defines a checked integer type as an example of operator overloading.

Andrei

Reply via email to