[Boost-bugs] [Boost C++ Libraries] #12181: Compile cpp_int fails in gcc6.1

Subject: [Boost-bugs] [Boost C++ Libraries] #12181: Compile cpp_int fails in gcc6.1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-07 11:38:49


#12181: Compile cpp_int fails in gcc6.1
----------------------------------------+----------------------------
 Reporter: Mario Lezcano <mariolez@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
  Version: Boost 1.60.0 | Severity: Problem
 Keywords: |
----------------------------------------+----------------------------
 [[Image()]]Using boost 1.60.0-4 and gcc 6.1.1.20160501, the following code
 {{{#!c++
 // gcc6.cpp
 #include <boost/multiprecision/cpp_int.hpp>

 int main(){
 }
 }}}
 fails to compile with error
 {{{#!c++
 In file included from /usr/include/boost/config.hpp:61:0,
                  from /usr/include/boost/cstdint.hpp:36,
                  from /usr/include/boost/multiprecision/cpp_int.hpp:11,
                  from gcc6.cpp:1:
 /usr/include/boost/multiprecision/cpp_int.hpp:193:4: error: right operand
 of shift expression ‘(1u << 63u)’ is >= than the precision of the left
 operand [-fpermissive]
     BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits -
 1));
     ^
 /usr/include/boost/multiprecision/cpp_int.hpp:416:4: error: right operand
 of shift expression ‘(1u << 63u)’ is >= than the precision of the left
 operand [-fpermissive]
     BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits -
 1));
     ^
 /usr/include/boost/multiprecision/cpp_int.hpp:568:4: error: right operand
 of shift expression ‘(1u << 63u)’ is >= than the precision of the left
 operand [-fpermissive]
     BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits -
 1));
 }}}
 when compiled with
 {{{
 g++ gcc6.cpp
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12181>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC