core.checkedint

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 24 18:58:55 PDT 2016


On 6/24/2016 6:42 PM, Andrei Alexandrescu wrote:
> With your suggestion, this would also be an overflow:
>
> long x = -1;
> auto y = array.length + x;
>
> I would be hard pressed to acknowledge that as an overflow that needs to be
> dynamically signaled. And the beauty of two's complement is that indeed it just
> works.

I'm curious if that produces an overflow error on the newer clang that 
instruments such things.



More information about the Digitalmars-d mailing list