Returning fixed size arrays

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 26 06:43:19 PDT 2014


John Colvin:

> It is,

As far as I know, D is using that as an optimization, not as an 
ABI default that must happen at all optimization levels.


> but a copy is made after the function returns anyway, for 
> reasons unknown to me. For some reason the optimizer can't 
> elide it (ldc2 -O5 -release, with a pragma(LDC_never_inline); 
> inside foo).

Right. perhaps I'll have to ask this again in the main D 
newsgroup (but perhaps better to do it Monday).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list