Dynamic arrays allocation size

Steven Schveighoffer schveiguy at yahoo.com
Tue Mar 26 11:24:39 PDT 2013


On Tue, 26 Mar 2013 14:17:16 -0400, Luís Marques <luismarques at gmail.com>  
wrote:

> But my point is even more simple: is there a stance on what the  
> overflow/underflow semantics are? E.g., are they undefined (might wrap,  
> might saturate, might have one's complement behavior, etc), defined only  
> for unsigned integers (like C and C++), etc?

http://dlang.org/expression.html#AddExpression

"If both operands are of integral types and an overflow or underflow  
occurs in the computation, wrapping will happen. That is, uint.max + 1 ==  
uint.min and uint.min - 1 == uint.max."

-Steve


More information about the Digitalmars-d mailing list