diff options
| author | 2025-12-01 18:22:38 +0100 | |
|---|---|---|
| committer | 2025-12-01 18:22:38 +0100 | |
| commit | 0e7a4cbf1d2655240dd2a7e3c289b1b19148cc64 (patch) | |
| tree | 900bd8525e6294394f911e96bc77ef287da2b41d /c | |
| parent | 7135b43053b3edec3a2c0e3b3f2674581a599995 (diff) | |
c: narrowing ints of different signedness...
Diffstat (limited to 'c')
| -rw-r--r-- | c/c.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3259,7 +3259,7 @@ compileexpr(struct function *fn, const struct expr *ex, bool discard) r = compileexpr(fn, sub, discard); if (discard) return NOREF; r = cvt(fn, ex->ty, sub->ty, r); - if (isint(ex->ty) && typesize(ex->ty) < typesize(sub->ty)) + if (isint(ex->ty) && (typesize(ex->ty) < typesize(sub->ty) || issigned(ex->ty) != issigned(sub->ty))) return narrow(fn, type2cls[scalartypet(ex->ty)], ex->ty, r, 0); return r; case ENEG: |