Disallow null references in safe code?

Dicebot public at dicebot.lv
Sun Feb 2 02:58:50 PST 2014


On Sunday, 2 February 2014 at 03:45:06 UTC, Andrei Alexandrescu 
wrote:
> On 2/1/14, 7:35 PM, deadalnix wrote:
>> http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html
>
> Whoa, thanks. So the compiler figures null pointer dereference 
> in C is undefined behavior, which means the entire program 
> could do whatever if that does happen.
>
> Andrei

As far as I have understood previous posts, it is even worse than 
that - LLVM optimiser assumes that C semantics whatever 
high-level language is.

deadalnix is that true?


More information about the Digitalmars-d mailing list