Can we just have struct inheritence already?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Thu Jun 13 20:10:06 UTC 2019


On Thursday, June 13, 2019 12:00:46 PM MDT Ola Fosheim Grøstad via 
Digitalmars-d wrote:
> On Thursday, 13 June 2019 at 17:39:56 UTC, Jonathan M Davis wrote:
> > As I understand it, a real problem related to this that exists
> > right now is that llvm considers dereferencing null to be
> > undefined behavior.
>
> Not really. Clang might.
>
> You should be able to control this by how you set up the
> optimizer:
>
> http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html

Johan Engelen (one of the LDC developers) has specifically brought this up
as an issue before. It may very well be possible for the LDC developers to
make LLVM behave differently, but as I understand it, dereferencing null is
currently considered undefined behavior by llvm when ldc has it optimize
code and that that can result in non- at safe befavior in @safe code.

- Jonathan M Davis






More information about the Digitalmars-d mailing list