[Issue 4231] Solitary opUnary Postincrement and Postdecrement user defined operators are broken.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 2 08:57:51 PDT 2010


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



--- Comment #5 from Andrei Alexandrescu <andrei at metalanguage.com> 2010-06-02 08:57:50 PDT ---
That looks like a very specialized optimization to me. In particular, if the
postblit has side effects, the optimizer must have advanced knowledge in order
to elide it. This is a path that C++ has taken with copy constructor elision,
and it's not a path we should take.

I think the language definition should clarify that postincrement and
postdecrement are lowered into their pre- counterparts if the result is not
taken.

-- 
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