From b7d9d27b0e168fc43938d1fe68c3467f65dcc4c0 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Wed, 20 Jun 2018 20:47:24 +0100 Subject: [PATCH] libm/common/s_round.c (round): Add cast for 16-bit CPUs --- newlib/libm/common/s_round.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libm/common/s_round.c b/newlib/libm/common/s_round.c index 047574a84..e3a91d6c2 100644 --- a/newlib/libm/common/s_round.c +++ b/newlib/libm/common/s_round.c @@ -68,7 +68,7 @@ SEEALSO msw &= 0x80000000; if (exponent_less_1023 == -1) /* Result is +1.0 or -1.0. */ - msw |= (1023 << 20); + msw |= ((__int32_t)1023 << 20); lsw = 0; } else