aboutsummaryrefslogtreecommitdiffhomepage
path: root/c/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/eval.c')
-rw-r--r--c/eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/c/eval.c b/c/eval.c
index 000a627..0dd8140 100644
--- a/c/eval.c
+++ b/c/eval.c
@@ -167,6 +167,8 @@ isaddrconst(struct expr *ex)
return isaddrconst(ex->sub) || (eval(ex->sub, EVSTATICINI) && ex->sub->t == ENUMLIT);
if (ex->t == EADDROF && (isglobsym(ex->sub) || (ex->sub->t == EGETF && isglobsym(ex->sub->sub))))
return 1;
+ if (ex->t == EADDROF && ex->sub->t == EINIT)
+ return eval(ex->sub, EVSTATICINI);
if (ex->t == EGETF && ex->ty.t == TYARRAY && isglobsym(ex->sub))
return 1;
if (isglobsym(ex) && in_range(ex->ty.t, TYARRAY, TYFUNC))