diff options
| author | 2025-11-16 12:09:35 +0100 | |
|---|---|---|
| committer | 2025-11-16 12:09:35 +0100 | |
| commit | b0c0f2d2d885c5901de08ed08dba9fff079bf6e3 (patch) | |
| tree | 0cb8dcca1daa03b77af5df3e67f8a33e67a88146 /c | |
| parent | 4c138cb1fd66b04e3f2cba27a3d84e335d0daace (diff) | |
eval: only isaddrconst for ptrs
Diffstat (limited to 'c')
| -rw-r--r-- | c/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -290,7 +290,7 @@ eval(struct expr *ex, enum evalmode mode) return 1; } if (ex->t == ESTRLIT && mode > EVINTCONST) return 1; - if (mode == EVSTATICINI && isaddrconst(ex)) { + if (mode == EVSTATICINI && ex->ty.t == TYPTR && isaddrconst(ex)) { struct expr *e = ex; while (e->t == ECAST) e = e->sub; if (e != ex) { |