scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit b5d5fce67e0924acced64ca3b4542a238ea1c678
parent ea6f348b4e6b23fdbb93896aac72ea6ace1d8639
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 12 Aug 2016 11:06:51 +0200

[cc2-qbe] move the call to setlabel() to cgen()

Cgen() is the function called to generate the asm code
for a C statement, and it means that it will receive the node
which has the label.

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

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c @@ -241,7 +241,6 @@ rhs(Node *np, Node *ret) char *tbl; Symbol *true, *false; - setlabel(np->label); tp = &np->type; switch (np->op) { @@ -323,6 +322,7 @@ cgen(Node *np) Node n, *aux, *next, *ifyes, *ifno; Symbol *label1, *label2; + setlabel(np->label); switch (np->op) { case OJMP: ifyes = label2node(np->u.sym);