If you needed any more evidence that memory safety is the future...

Ola Fosheim Grostad via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 25 14:38:17 PST 2017


On Saturday, 25 February 2017 at 21:49:43 UTC, Chris Wright wrote:
> On Sat, 25 Feb 2017 22:12:13 +0100, Timon Gehr wrote:
>
>> On 25.02.2017 15:38, Chris Wright wrote:
>>> On Sat, 25 Feb 2017 13:23:03 +0100, Timon Gehr wrote:
>>>> If 'disable' (as can be reasonably expected) means the 
>>>> compiler will behave as if they were never present, then it 
>>>> does not.
>>>
>>> https://dlang.org/dmd-linux.html#switch-release
>>>
>>>
>> This literally says "[...] assertion failures are undefined 
>> behaviour".
>
> ...
>
> It says it doesn't emit code for assertions.
>
> Then it says assertion failures are undefined behavior.
>
> How does that even work?

LLVM and other optimizers provide functionality for introducing 
axioms directly. D allows compilers to turn asserts into axioms 
without proof. If axioms are contradicting each other the whole 
program becomes potentially undefined (i.e. True and False become 
arbitrary).




More information about the Digitalmars-d mailing list