Compiling to 68K processor (Maybe GDC?)

Johan Engelen j at j.nl
Mon Jan 21 17:12:11 UTC 2019


On Monday, 21 January 2019 at 17:08:23 UTC, Johan Engelen wrote:
>
> For LDC, dereferencing `null` invokes Undefined Behavior [1].

For completeness, you can tell LDC that dereferencing `null` is 
_not_ UB in a particular function by specifying 
`@llvmAttr("null-pointer-is-valid", "true")`:

https://d.godbolt.org/z/1FQCRf

-Johan



More information about the Digitalmars-d-learn mailing list