diff options
| author | 2025-10-15 11:18:47 +0200 | |
|---|---|---|
| committer | 2025-10-15 11:18:47 +0200 | |
| commit | 41483dda42f6eb2ce45b0f8580fc46eacf6390b8 (patch) | |
| tree | b804c23ae9f3539234a2d384f991c898760975cb /eval.c | |
| parent | 347d237a114495c0a9b9d14d38551d544dca021d (diff) | |
c: fix codegen for enum types
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -137,7 +137,7 @@ isaddrconst(struct expr *ex) { if (ex->t == ECAST) return isaddrconst(ex->sub) || (eval(ex->sub, EVSTATICINI) && ex->sub->t == ENUMLIT); - if (ex->t == EADDROF && isglobsym(ex->sub)) + if (ex->t == EADDROF && (isglobsym(ex->sub) || (ex->sub->t == EGETF && isglobsym(ex->sub->sub)))) return 1; if (isglobsym(ex) && in_range(ex->ty.t, TYARRAY, TYFUNC)) return 1; |