scc

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

commit 7b36900e3ca3e2f2868df07c85c0d3195637aaae
parent b50c462e9581a78db041e3224f514786a199b113
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 22 Apr 2016 15:29:08 +0200

[cc2-qbe] Simplify cgen()

Tmpnode() returns it first parameter, so it can be used as parameter of code().

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

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c @@ -200,8 +200,7 @@ cgen(Node *np) l = np->left = load(l); if ((r->flags & (ISTMP|ISCONS)) == 0) r = np->right = load(r); - tmpnode(np); - code(op, np, l, r); + code(op, tmpnode(np), l, r); return np; case ONOP: case OBLOOP: