diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-09-04 10:44:33 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-09-04 10:44:33 +0000 |
commit | 7a8376e1a79b36dcdf5897d29890b14f5ae06650 (patch) | |
tree | 2221ccfa95f74672b64f7e8295b1448aefb47bd1 | |
parent | 946f080da6da583813e4849337d2a5cfbb69514b (diff) | |
download | mpfr-7a8376e1a79b36dcdf5897d29890b14f5ae06650.tar.gz |
[src/get_si.c] Make sure that a left shift is done on an unsigned type
(as a left shift on a 0 of signed type was not specified by C90).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13119 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | src/get_si.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/get_si.c b/src/get_si.c index e2dbccefd..eff3c33a2 100644 --- a/src/get_si.c +++ b/src/get_si.c @@ -88,7 +88,7 @@ mpfr_get_si (mpfr_srcptr f, mpfr_rnd_t rnd) if (exp <= GMP_NUMB_BITS) s += MPFR_MANT(x)[n - 1] >> (GMP_NUMB_BITS - exp); else - s += (long) MPFR_MANT(x)[n - 1] << (exp - GMP_NUMB_BITS); + s += (unsigned long) MPFR_MANT(x)[n - 1] << (exp - GMP_NUMB_BITS); n --; exp -= GMP_NUMB_BITS; } |