safety: null checks

Ola Fosheim Grostad ola.fosheim.grostad at
Sun Nov 22 23:00:25 UTC 2020

On Sunday, 22 November 2020 at 22:36:40 UTC, Paul Backus wrote:
> Memory safety is concerned specifically with avoiding undefined 
> behavior. Crashing the program isn't undefined behavior, so 
> it's allowed in @safe code.

I understand what you mean, but at high optimization levels 
dereferencing a null pointer can trigger undefined behaviour.

More information about the Digitalmars-d mailing list