Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorAndoni Arregi <andoni.arregui@gtd-gmbh.de>2023-04-12 18:34:44 +0300
committerJeff Johnston <jjohnstn@redhat.com>2023-04-13 20:34:57 +0300
commit9e89e667299a1f17572930b45661ce98afca76c8 (patch)
tree4fd74ff6d95e18776200fda71a228bd41a3538eb /newlib
parente5a36e6af7c52b70fbc8c11a888220d8579e0275 (diff)
Compare j as unsigned
j is int32_t and thus j<<31 is undefined if j==1. Taken from FreeBSD commit bdd8abc6d6a93ce3ab8ad5db716222ee3110c4a3
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libm/math/e_pow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libm/math/e_pow.c b/newlib/libm/math/e_pow.c
index f24a98f6e..0e2251f10 100644
--- a/newlib/libm/math/e_pow.c
+++ b/newlib/libm/math/e_pow.c
@@ -141,7 +141,7 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
k = (iy>>20)-0x3ff; /* exponent */
if(k>20) {
j = ly>>(52-k);
- if((j<<(52-k))==ly) yisint = 2-(j&1);
+ if(((uint32_t)j<<(52-k))==ly) yisint = 2-(j&1);
} else if(ly==0) {
j = iy>>(20-k);
if((j<<(20-k))==iy) yisint = 2-(j&1);