[Issue 9985] Postblit isn't called on local struct return

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 24 14:30:40 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9985



--- Comment #2 from Sebastian Graf <SebastianGraf at t-online.de> 2013-04-24 14:30:39 PDT ---
I stumbled over this when using a C library and it got me plenty time to trace
it back. Seems like after all I missed one of those tiny spec details.

Anyhow, I even had a look at the generated assembly on windows, with/without
optimization.
There seems to be no NRVO applied, since makeS() does 2 copies (rep movsd), one
to copy S.init into s and one to copy s into __retval at exit. I may be
mistaken, but isn't the point of NRVO to make &s == &__retval, thus only
needing to copy S.init into &__retval?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list