scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 0f4a8d6d730ce5965cd8fab915e816a3fdaa8759
parent 9853c04d3b591c01d20a54351042c17c97e85f4a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 20 Jan 2017 10:00:05 +0100

[cc2-qbe] fix OCOMMA operator

Calling rhs() from rhs() with the same parameters was a really bad
idea.

Diffstat:
Mcc2/arch/qbe/cgen.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c @@ -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: