summaryrefslogtreecommitdiff
path: root/mpz/get_si.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpz/get_si.c')
-rw-r--r--mpz/get_si.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mpz/get_si.c b/mpz/get_si.c
index 94e6b8865..05538a97a 100644
--- a/mpz/get_si.c
+++ b/mpz/get_si.c
@@ -29,12 +29,14 @@ mpz_get_si (mpz_srcptr z)
mp_size_t size = z->_mp_size;
mp_limb_t low_limb = zp[0];
+#if GMP_NAIL_BITS != 0
if (ULONG_MAX > GMP_NUMB_MAX != 0 && ABS (size) >= 2)
{
/* happens for nails, but not if LONG_LONG_LIMB */
/* assume two limbs are enough to fill an ulong */
low_limb += zp[1] << GMP_NUMB_BITS;
}
+#endif
if (size > 0)
return (long) low_limb & LONG_MAX;