[hackers] [scc] [cc2-qbe] fix OCOMMA operator || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 20 Jan 2017 10:03:24 +0100 (CET)

commit 0f4a8d6d730ce5965cd8fab915e816a3fdaa8759
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Jan 20 10:00:05 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jan 20 10:00:05 2017 +0100

    [cc2-qbe] fix OCOMMA operator
    
    Calling rhs() from rhs() with the same parameters was a really bad
    idea.

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index b476973..26b3508 100644
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
_AT_@ -589,7 +589,8 @@ rhs(Node *np, Node *ret)
         case OASK:
                 return ternary(np, ret);
         case OCOMMA:
- return rhs(np, ret);
+ rhs(l, &aux1);
+ return rhs(r, ret);
         case OPTR:
                 return load(tp, rhs(l, &aux1), ret);
         case OADDR:
Received on Fri Jan 20 2017 - 10:03:24 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 20 2017 - 10:12:14 CET