ref: 7cbc37c64d22c947533e0f2a0c8498f94fc1f479
parent: a80c579064560b4bcf8ed28ed857b6265dc5fd37
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Nov 3 01:30:19 EDT 2021
cc2/qbe: Avoid mixing code and declarations
--- a/src/cmd/cc/cc2/target/qbe/cgen.c
+++ b/src/cmd/cc/cc2/target/qbe/cgen.c
@@ -455,7 +455,8 @@
static Node *
rhs(Node *np, Node *ret)
{
- Node aux1, aux2, *phi, *l = np->left, *r = np->right;
+ Node aux1, aux2, aux3;
+ Node *phi, *l = np->left, *r = np->right;
Type *tp;
int off, op;
char *tbl;
@@ -574,7 +575,7 @@
aux2.right = np->right;
aux2.left = np->left;
r = rhs(&aux2, &aux1);
- Node aux3;
+
if (l->op == OCAST) {
aux3.type = l->left->type;
aux3.op = OCAST;