From 49b81eae41e88068ede81e67e783d2f93926285a Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 11 Apr 2026 23:27:35 +0200 Subject: frontend: always narrow assignment expression used as value --- src/c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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)) -- cgit v1.2.3