diff options
| author | 2025-11-26 11:14:55 +0100 | |
|---|---|---|
| committer | 2025-11-26 11:14:55 +0100 | |
| commit | ccb8e79a45d8e06c127e59fb1404a726691c5f26 (patch) | |
| tree | 899d5180b916766b6223954c04b5a212c0a0f686 /c/eval.c | |
| parent | 31c91845d07f47d71950dbc35e8d2620268bcbd3 (diff) | |
c: more static initializer fixes
Diffstat (limited to 'c/eval.c')
| -rw-r--r-- | c/eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)) |