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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #3 from Don <clugd...@yahoo.com.au> 2010-08-13 12:15:34 PDT ---
One option would be to change PowExp to stop using CommaExp, but I think that
lowering involving comma expressions is such a useful internal feature that
it's worth supporting.
---------------
PATCH:
optimize.c, fromConstInitializer(), line 142.

        e = expandVar(result, v);
        if (e)
        {
+            // If it is a comma expression involving a declaration, we mustn't 
+            // perform a copy -- we'd get two declarations of the same
variable.
+            // See bugzilla 4465.
+            if (e->op == TOKcomma && ((CommaExp *)e)->e1->op ==
TOKdeclaration)
+                 e= e1;
+            else
        if (e->type != e1->type && e1->type && e1->type->ty != Tident)
            {   // Type 'paint' operation
                e = e->copy();

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

Reply via email to