[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:53:48 PDT 2010


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



--- Comment #4 from Don <clugdbug at yahoo.com.au> 2010-06-02 08:53:44 PDT ---
(In reply to comment #2)
> Doesn't the optimizer take care of eliminating the unused temporary and copy?

Good question. Maybe it does. It sees:
auto t = e, foo(e), t;
Does it know in general that foo() cannot reach t?

BTW -- should the compiler be allowed to eliminate the temporary, if there's a
postblit? Ie, is it *forced* to perform the rewrite:

(auto t = e, --e, t)

even if the return value is not used? The optimizer certainly couldn't
eliminate it in the general case, but it'd be possible if the front-end is
allowed to elide it.

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