Escaping address of

Nick Treleaven nick at geany.org
Wed Apr 11 16:08:06 UTC 2018


Is this a known bug? With v2.079.0, with or without -dip1000:

@safe unittest
{
     struct S
     {
         int i;
     }
     auto p = &S().i;
}

The address of field `i` should not escape, right? It's also 
incorrectly allowed when using an lvalue of S (when -dip1000 is 
not present).


More information about the Digitalmars-d-learn mailing list