Boost C++ Libraries: Ticket #12181: Compile cpp_int fails in gcc6.1 https://svn.boost.org/trac10/ticket/12181 <p> Using boost 1.60.0-4 and gcc 6.1.1.20160501, the following code </p> <div class="wiki-code"><div class="code"><pre><span class="c1">// gcc6.cpp</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/multiprecision/cpp_int.hpp&gt;</span><span class="cp"></span> <span class="kt">int</span> <span class="nf">main</span><span class="p">(){</span> <span class="p">}</span> </pre></div></div><p> fails to compile with error </p> <div class="wiki-code"><div class="code"><pre><span class="n">In</span> <span class="n">file</span> <span class="n">included</span> <span class="n">from</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">boost</span><span class="o">/</span><span class="n">config</span><span class="p">.</span><span class="nl">hpp</span><span class="p">:</span><span class="mi">61</span><span class="o">:</span><span class="mi">0</span><span class="p">,</span> <span class="n">from</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">boost</span><span class="o">/</span><span class="n">cstdint</span><span class="p">.</span><span class="nl">hpp</span><span class="p">:</span><span class="mi">36</span><span class="p">,</span> <span class="n">from</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">boost</span><span class="o">/</span><span class="n">multiprecision</span><span class="o">/</span><span class="n">cpp_int</span><span class="p">.</span><span class="nl">hpp</span><span class="p">:</span><span class="mi">11</span><span class="p">,</span> <span class="n">from</span> <span class="n">gcc6</span><span class="p">.</span><span class="nl">cpp</span><span class="p">:</span><span class="mi">1</span><span class="o">:</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">boost</span><span class="o">/</span><span class="n">multiprecision</span><span class="o">/</span><span class="n">cpp_int</span><span class="p">.</span><span class="nl">hpp</span><span class="p">:</span><span class="mi">193</span><span class="o">:</span><span class="mi">4</span><span class="o">:</span> <span class="nl">error</span><span class="p">:</span> <span class="n">right</span> <span class="n">operand</span> <span class="n">of</span> <span class="n">shift</span> <span class="n">expression</span> <span class="err">‘</span><span class="p">(</span><span class="mi">1u</span> <span class="o">&lt;&lt;</span> <span class="mi">63u</span><span class="p">)</span><span class="err">’</span> <span class="n">is</span> <span class="o">&gt;=</span> <span class="n">than</span> <span class="n">the</span> <span class="n">precision</span> <span class="n">of</span> <span class="n">the</span> <span class="n">left</span> <span class="n">operand</span> <span class="p">[</span><span class="o">-</span><span class="n">fpermissive</span><span class="p">]</span> <span class="n">BOOST_STATIC_CONSTANT</span><span class="p">(</span><span class="n">limb_type</span><span class="p">,</span> <span class="n">sign_bit_mask</span> <span class="o">=</span> <span class="mi">1u</span> <span class="o">&lt;&lt;</span> <span class="p">(</span><span class="n">limb_bits</span> <span class="o">-</span> <span class="mi">1</span><span class="p">));</span> <span class="o">^</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">boost</span><span class="o">/</span><span class="n">multiprecision</span><span class="o">/</span><span class="n">cpp_int</span><span class="p">.</span><span class="nl">hpp</span><span class="p">:</span><span class="mi">416</span><span class="o">:</span><span class="mi">4</span><span class="o">:</span> <span class="nl">error</span><span class="p">:</span> <span class="n">right</span> <span class="n">operand</span> <span class="n">of</span> <span class="n">shift</span> <span class="n">expression</span> <span class="err">‘</span><span class="p">(</span><span class="mi">1u</span> <span class="o">&lt;&lt;</span> <span class="mi">63u</span><span class="p">)</span><span class="err">’</span> <span class="n">is</span> <span class="o">&gt;=</span> <span class="n">than</span> <span class="n">the</span> <span class="n">precision</span> <span class="n">of</span> <span class="n">the</span> <span class="n">left</span> <span class="n">operand</span> <span class="p">[</span><span class="o">-</span><span class="n">fpermissive</span><span class="p">]</span> <span class="n">BOOST_STATIC_CONSTANT</span><span class="p">(</span><span class="n">limb_type</span><span class="p">,</span> <span class="n">sign_bit_mask</span> <span class="o">=</span> <span class="mi">1u</span> <span class="o">&lt;&lt;</span> <span class="p">(</span><span class="n">limb_bits</span> <span class="o">-</span> <span class="mi">1</span><span class="p">));</span> <span class="o">^</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">include</span><span class="o">/</span><span class="n">boost</span><span class="o">/</span><span class="n">multiprecision</span><span class="o">/</span><span class="n">cpp_int</span><span class="p">.</span><span class="nl">hpp</span><span class="p">:</span><span class="mi">568</span><span class="o">:</span><span class="mi">4</span><span class="o">:</span> <span class="nl">error</span><span class="p">:</span> <span class="n">right</span> <span class="n">operand</span> <span class="n">of</span> <span class="n">shift</span> <span class="n">expression</span> <span class="err">‘</span><span class="p">(</span><span class="mi">1u</span> <span class="o">&lt;&lt;</span> <span class="mi">63u</span><span class="p">)</span><span class="err">’</span> <span class="n">is</span> <span class="o">&gt;=</span> <span class="n">than</span> <span class="n">the</span> <span class="n">precision</span> <span class="n">of</span> <span class="n">the</span> <span class="n">left</span> <span class="n">operand</span> <span class="p">[</span><span class="o">-</span><span class="n">fpermissive</span><span class="p">]</span> <span class="n">BOOST_STATIC_CONSTANT</span><span class="p">(</span><span class="n">limb_type</span><span class="p">,</span> <span class="n">sign_bit_mask</span> <span class="o">=</span> <span class="mi">1u</span> <span class="o">&lt;&lt;</span> <span class="p">(</span><span class="n">limb_bits</span> <span class="o">-</span> <span class="mi">1</span><span class="p">));</span> </pre></div></div><p> when compiled with </p> <pre class="wiki">g++ gcc6.cpp </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12181 Trac 1.4.3 John Maddock Sun, 08 May 2016 08:44:11 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12181#comment:1 https://svn.boost.org/trac10/ticket/12181#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This was fixed in <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/f9c8f9ec091ad232c0a291904f7839d665d098e0"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/f9c8f9ec091ad232c0a291904f7839d665d098e0</a> which will be in the next release (very shortly I hope!) </p> Ticket