aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-04-11 23:27:35 +0200
committerlemon <lsof@mailbox.org>2026-04-11 23:27:50 +0200
commit49b81eae41e88068ede81e67e783d2f93926285a (patch)
tree44d4f4958188d9e669c2d8180e247abf85dc7f67
parentf1f28623774bdb410a9ba22b8ae111c987dc4d81 (diff)
frontend: always narrow assignment expression used as value
-rw-r--r--src/c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c.c b/src/c.c
index c60c71f..5fadedc 100644
--- a/src/c.c
+++ b/src/c.c
@@ -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))