diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2016-12-29 00:27:11 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2016-12-29 00:27:11 +0100 |
commit | 88b1ba7003c370d6a31d3a62a456c418543f065f (patch) | |
tree | 94d11197185f516fa421dd5b35c01d496cc4168c /gmp-h.in | |
parent | b93bf1c7bdf9b95eb7127b4068edd17dc874ceda (diff) | |
download | gmp-88b1ba7003c370d6a31d3a62a456c418543f065f.tar.gz |
gmp-h.in: Use ~ __GMP_CAST (mp_bitcnt_t, 0) for maximal bit count
Diffstat (limited to 'gmp-h.in')
-rw-r--r-- | gmp-h.in | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1844,7 +1844,7 @@ mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW mp_bitcnt_t __gmp_result; __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? ULONG_MAX : 0); + __gmp_result = (__gmp_usize < 0 ? ~ __GMP_CAST (mp_bitcnt_t, 0) : __GMP_CAST (mp_bitcnt_t, 0)); if (__GMP_LIKELY (__gmp_usize > 0)) __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); return __gmp_result; |