summaryrefslogtreecommitdiff
path: root/mpz/cmp_si.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2000-06-20 23:59:44 +0200
committerKevin Ryde <user42@zip.com.au>2000-06-20 23:59:44 +0200
commit1263072c1aaeda9a30bec81c97136fa6fc6d6c31 (patch)
tree26304f37a71b3574e2c5f5774f026a4fa384f35a /mpz/cmp_si.c
parentf75567e21a349f85bd25655f5d093bf516fd70aa (diff)
downloadgmp-1263072c1aaeda9a30bec81c97136fa6fc6d6c31.tar.gz
* mpz/{set,iset,cmp}_si.c [_LONG_LONG_LIMB]: Fix handling of 0x80...00.
Diffstat (limited to 'mpz/cmp_si.c')
-rw-r--r--mpz/cmp_si.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mpz/cmp_si.c b/mpz/cmp_si.c
index ecb659aff..d3f4d55c5 100644
--- a/mpz/cmp_si.c
+++ b/mpz/cmp_si.c
@@ -1,7 +1,8 @@
/* mpz_cmp_si(u,v) -- Compare an integer U with a single-word int V.
Return positive, zero, or negative based on if U > V, U == V, or U < V.
-Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+Copyright (C) 1991, 1993, 1994, 1995, 1996, 2000 Free Software Foundation,
+Inc.
This file is part of the GNU MP Library.
@@ -53,10 +54,10 @@ _mpz_cmp_si (u, v_digit)
u_digit = u->_mp_d[0];
- if (u_digit == v_digit)
+ if (u_digit == (mp_limb_t) (unsigned long) v_digit)
return 0;
- if (u_digit > v_digit)
+ if (u_digit > (mp_limb_t) (unsigned long) v_digit)
return usize;
else
return -usize;