Dynamic arrays allocation size

"Luís "Luís
Tue Mar 26 11:17:16 PDT 2013


On Tuesday, 26 March 2013 at 18:04:25 UTC, Steven Schveighoffer 
wrote:
> The official stance is, it's not an error.  If we treated it as 
> an error, then it would be very costly to implement, every 
> operation would have to check for overflow.  The CPU does not 
> assist in this.

You say not an error as meaning the language definition does not 
guarantee checking for overflows/underflows and throwing an 
exception if one occurs.

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?


More information about the Digitalmars-d mailing list