Integer overflow and underflow semantics?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 18 12:02:45 PDT 2014


On 7/18/2014 1:59 AM, John Colvin wrote:
> On Friday, 18 July 2014 at 08:49:43 UTC, Walter Bright wrote:
>> On 7/17/2014 4:56 AM, David Nadlinger wrote:
>>> Oh dear, you'd be in for a very nasty surprise if you relied on this. ;)
>>
>> When I wrote that part of the spec, it was long before these sorts of
>> optimizations appeared, and it never occurred to me that they would be.
>
> Does the dmd backend do any such optimisations? I assume not.

No, it doesn't, and I don't intend to add them. I believe they cause more 
trouble than they're worth. That applies to some other optimizations I've also 
refused to implement, because while legal, they mess up code that most users 
believe is correct.


More information about the Digitalmars-d mailing list