diff options
| author | 2026-04-18 11:13:44 +0200 | |
|---|---|---|
| committer | 2026-04-18 11:13:44 +0200 | |
| commit | 0178e0161f46bd396c2282207ea1894b295f692e (patch) | |
| tree | 46f75401fcafac15e0dcdebfbd14cdae59101fae | |
| parent | 935b7474b4ac7d7e30c20bdd87720bdd97d33a2f (diff) | |
c: allow compile time eval of left-shifting negative value
| -rw-r--r-- | src/c_eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c_eval.c b/src/c_eval.c index 0eb6df2..8518b91 100644 --- a/src/c_eval.c +++ b/src/c_eval.c @@ -330,7 +330,7 @@ binop(Expr *ex, enum evalmode mode) case EXOR|U: case EXOR|S: a->u ^= b->u; break; - case ESHL|S: if (a->i < 0) return 0; + case ESHL|S: if (a->i < 0) { /* UB, but it's fine? */ } case ESHL|U: if (b->u >= 8*targ_primsizes[opty.t]) return 0; a->u <<= b->u; break; |