assert semantic change proposal

eles via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 5 23:56:39 PDT 2014


On Wednesday, 6 August 2014 at 04:05:41 UTC, David Bregman wrote:
> On Wednesday, 6 August 2014 at 01:11:55 UTC, Jeremy Powers via 
> Digitalmars-d wrote:

> How can there be any question? This is a change in the 
> compiler, a change in the docs, change in what your program 
> does, change of the very bytes in the executable. If my program

I feel that, at this stage, is only about how a compiler glag, 
specifically "-release" works. For other configurations, there is 
no problem: event if the optimizer optimizes based on asserts, 
the asserts themselves are part of the code: code is there and 
the assertion will fail before execution enters the optimized 
path. This is just like any other optimization, nothing special 
about it.

The problem with "-release" might be formulated in that it 
optimizes based on a code that is no longer present (the asserts 
are wiped out). It keeps the optimization, but it dismisses the 
garde-fous.


More information about the Digitalmars-d mailing list