commit f2a433b0a0c6d336bf4f0e49be6cd6270d3bedfc
parent ec378d87b20762a3c37a0b7b31b78e1d0ade9e8c
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 28 Dec 2024 12:42:49 +0100
cc2/z80: Use nextstmt()
A setp forward to remove direct access to stmt structure.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cmd/scc-cc/cc2/z80-scc/cgen.c b/src/cmd/scc-cc/cc2/z80-scc/cgen.c
@@ -521,7 +521,7 @@ ret(Node *np)
static Node *
cgen(Range *rp, Node *np)
{
- Node aux, *p, *next;
+ Node aux, *next;
setlabel(np->label);
switch (np->op) {
@@ -540,7 +540,7 @@ cgen(Range *rp, Node *np)
code(ASJP, NULL, &aux, NULL);
break;
case OBRANCH:
- next = np->next;
+ next = nextstmt(rp, KEEPCUR);
if (!next->label)
next->label = newlabel();
bool(np->left, np->u.sym, next->label);