summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/add_ui.c2
-rw-r--r--src/div_ui.c2
-rw-r--r--src/exp_2.c2
-rw-r--r--src/sub_ui.c2
-rw-r--r--src/ui_sub.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/add_ui.c b/src/add_ui.c
index 1894cd19d..e6ad5db78 100644
--- a/src/add_ui.c
+++ b/src/add_ui.c
@@ -63,7 +63,7 @@ mpfr_add_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mpfr_rnd_t rnd_mode
MPFR_SAVE_EXPO_DECL (expo);
MPFR_TMP_INIT1 (up, uu, GMP_NUMB_BITS);
- MPFR_STAT_STATIC_ASSERT ((mp_limb_t) -1 >= (unsigned long) -1);
+ MPFR_STAT_STATIC_ASSERT (MPFR_LIMB_MAX >= ULONG_MAX);
/* So, u fits in a mp_limb_t, which justifies the casts below. */
MPFR_ASSERTD (u != 0);
count_leading_zeros (cnt, (mp_limb_t) u);
diff --git a/src/div_ui.c b/src/div_ui.c
index 799c6d0b6..26f3b0967 100644
--- a/src/div_ui.c
+++ b/src/div_ui.c
@@ -107,7 +107,7 @@ mpfr_div_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mpfr_rnd_t rnd_mode
/* don't use tmp=yp since the mpn_lshift call below requires yp >= tmp+1 */
tmp = MPFR_TMP_LIMBS_ALLOC (yn + 1);
- MPFR_STAT_STATIC_ASSERT ((mp_limb_t) -1 >= (unsigned long) -1);
+ MPFR_STAT_STATIC_ASSERT (MPFR_LIMB_MAX >= ULONG_MAX);
if (dif >= 0)
c = mpn_divrem_1 (tmp, dif, xp, xn, u); /* used all the dividend */
else /* dif < 0 i.e. xn > yn, don't use the (-dif) low limbs from x */
diff --git a/src/exp_2.c b/src/exp_2.c
index 028833836..ea6350be9 100644
--- a/src/exp_2.c
+++ b/src/exp_2.c
@@ -117,7 +117,7 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
{
mp_limb_t a;
mpfr_exp_t exp;
- MPFR_STAT_STATIC_ASSERT ((mp_limb_t) -1 >= (unsigned long) -1);
+ MPFR_STAT_STATIC_ASSERT (MPFR_LIMB_MAX >= ULONG_MAX);
/* Read the long directly (faster than using mpfr_get_si
since it fits, it is not singular, it can't be zero
and there is no conversion to do) */
diff --git a/src/sub_ui.c b/src/sub_ui.c
index ad24c1350..9bca863a3 100644
--- a/src/sub_ui.c
+++ b/src/sub_ui.c
@@ -63,7 +63,7 @@ mpfr_sub_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mpfr_rnd_t rnd_mode
MPFR_SAVE_EXPO_DECL (expo);
MPFR_TMP_INIT1 (up, uu, GMP_NUMB_BITS);
- MPFR_STAT_STATIC_ASSERT ((mp_limb_t) -1 >= (unsigned long) -1);
+ MPFR_STAT_STATIC_ASSERT (MPFR_LIMB_MAX >= ULONG_MAX);
/* So, u fits in a mp_limb_t, which justifies the casts below. */
MPFR_ASSERTD (u != 0);
count_leading_zeros (cnt, (mp_limb_t) u);
diff --git a/src/ui_sub.c b/src/ui_sub.c
index e8091a501..d5fae6e1c 100644
--- a/src/ui_sub.c
+++ b/src/ui_sub.c
@@ -64,7 +64,7 @@ mpfr_ui_sub (mpfr_ptr y, unsigned long int u, mpfr_srcptr x, mpfr_rnd_t rnd_mode
MPFR_SAVE_EXPO_DECL (expo);
MPFR_TMP_INIT1 (up, uu, GMP_NUMB_BITS);
- MPFR_STAT_STATIC_ASSERT ((mp_limb_t) -1 >= (unsigned long) -1);
+ MPFR_STAT_STATIC_ASSERT (MPFR_LIMB_MAX >= ULONG_MAX);
/* So, u fits in a mp_limb_t, which justifies the casts below. */
MPFR_ASSERTD (u != 0);
count_leading_zeros (cnt, (mp_limb_t) u);