Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81634 - trunk/boost/multiprecision
From: john_at_[hidden]
Date: 2012-11-30 11:29:18


Author: johnmaddock
Date: 2012-11-30 11:29:17 EST (Fri, 30 Nov 2012)
New Revision: 81634
URL: http://svn.boost.org/trac/boost/changeset/81634

Log:
Suppress GCC warning.
Text files modified:
   trunk/boost/multiprecision/cpp_int.hpp | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/boost/multiprecision/cpp_int.hpp
==============================================================================
--- trunk/boost/multiprecision/cpp_int.hpp (original)
+++ trunk/boost/multiprecision/cpp_int.hpp 2012-11-30 11:29:17 EST (Fri, 30 Nov 2012)
@@ -674,7 +674,7 @@
    typedef mpl::int_<Checked> checked_type;
 protected:
    BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(local_limb_type) * CHAR_BIT);
- BOOST_STATIC_CONSTANT(local_limb_type, limb_mask = MinBits < limb_bits ? (local_limb_type(1) << MinBits) -1 : (~local_limb_type(0)));
+ BOOST_STATIC_CONSTANT(local_limb_type, limb_mask = (MinBits < limb_bits) ? ((~local_limb_type(0)) >> (limb_bits - MinBits)) : (~local_limb_type(0)));
 private:
    local_limb_type m_data;
    bool m_sign;
@@ -1745,9 +1745,9 @@
          (is_void<Allocator>::value ?
             2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value
             : MinBits),
- 2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
- SignType,
- Checked,
+ 2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
+ SignType,
+ Checked,
          Allocator>,
       backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>
>::type type;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk