aboutsummaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2024-04-19 23:51:25 -0700
committerMichael Forney <mforney@mforney.org>2024-04-20 01:53:14 -0700
commit7837920950b4afc06cff96d04f27149866251378 (patch)
treee8a7ad52a43acdc7e71793865513cf1f0d7a8aed /eval.c
parent7b2ef1d8f8bb24376c5a79b1a9acec19dfe780f4 (diff)
qbe: Pass struct decl to mkglobal instead of fields from the decl
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 2c5a84f..7fe0fd9 100644
--- a/eval.c
+++ b/eval.c
@@ -119,7 +119,7 @@ eval(struct expr *expr)
if (expr->u.compound.storage != SDSTATIC)
break;
d = mkdecl(NULL, DECLOBJECT, t, expr->qual, LINKNONE);
- d->value = mkglobal(NULL, true, false);
+ d->value = mkglobal(d);
emitdata(d, expr->u.compound.init);
expr->kind = EXPRIDENT;
expr->u.ident.decl = d;