diff options
| author | 2026-02-28 09:50:06 +0100 | |
|---|---|---|
| committer | 2026-02-28 09:50:06 +0100 | |
| commit | 05ffd40b4c7a300387fa1fb67f8e4dbb8ee411e6 (patch) | |
| tree | ff3f70c1459c7264370588b8b8dceb7f903d6399 | |
| parent | a1897e02b4c9b8074023eef7967e4fb7435cce3a (diff) | |
c: static intializer bugfix introduced in6c3f1593e9
| -rw-r--r-- | c/eval.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -166,6 +166,7 @@ isaddrconst(struct expr *ex) { if (ex->t == ECAST) return isaddrconst(ex->sub) || (eval(ex->sub, EVSTATICINI) && ex->sub->t == ENUMLIT); + if (!isptrcvt(ex->ty)) return 0; if (ex->t == EADDROF && (isglobsym(ex->sub) || (ex->sub->t == EGETF && isglobsym(ex->sub->sub)))) return 1; if (ex->t == EADDROF && ex->sub->t == EDEREF && isaddrconst(ex->sub->sub)) { |