summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-04-30 01:55:38 +0200
committertege <tege@gmplib.org>2002-04-30 01:55:38 +0200
commitbcdd10b4cc0baff2be2952c4bd26aa52c93d63d9 (patch)
treed96f40d0a07351fca0b1d942aff6180b80165ca6
parentcd1aaa7bccb582dda770dfd5a3ae129ee61f7fe0 (diff)
downloadgmp-bcdd10b4cc0baff2be2952c4bd26aa52c93d63d9.tar.gz
(__GMPZ_FITS_UTYPE_P): Cast maxval to before shifting it.
-rw-r--r--gmp-h.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/gmp-h.in b/gmp-h.in
index 0f2400987..3b0d60fa6 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -1502,7 +1502,7 @@ mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u)
mp_size_t __gmp_n = z->_mp_size; \
mp_ptr __gmp_p = z->_mp_d; \
return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \
- || (__gmp_n == 2 && __gmp_p[1] <= (maxval >> GMP_NUMB_BITS)));
+ || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS)));
#endif
#if defined (__GMP_EXTERN_INLINE) || __GMP_FORCE_mpz_fits_uint_p