diff options
| author | 2026-04-11 23:27:35 +0200 | |
|---|---|---|
| committer | 2026-04-11 23:27:50 +0200 | |
| commit | 49b81eae41e88068ede81e67e783d2f93926285a (patch) | |
| tree | 44d4f4958188d9e669c2d8180e247abf85dc7f67 | |
| parent | f1f28623774bdb410a9ba22b8ae111c987dc4d81 (diff) | |
frontend: always narrow assignment expression used as value
| -rw-r--r-- | src/c.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3771,7 +3771,7 @@ compileexpr(Function *fn, const Expr *ex, bool discard) genstore(fn, ex->ty, adr, q); } if (discard) return NOREF; - return bitsiz ? narrow(fn, cls, sub[0].ty, q, bitsiz) : q; + return narrow(fn, cls, sub[0].ty, q, bitsiz); case ESETMUL: op = Omul; goto Compound; @@ -3828,7 +3828,7 @@ compileexpr(Function *fn, const Expr *ex, bool discard) genstore(fn, ex->ty, adr, q); } if (discard) return NOREF; - return bitsiz ? narrow(fn, cls, ex->ty, q, bitsiz) : q; + return narrow(fn, cls, ex->ty, q, bitsiz); case ECALL: r = compilecall(fn, ex); if (isint(ex->ty)) |