Boost C++ Libraries: Ticket #6854: boost/random/detail/integer_log2.hpp:71:35: warning: always_inline function might not be inlinable https://svn.boost.org/trac10/ticket/6854 <p> When compiled with GCC 4.7.0, boost/random/detail/integer_log2.hpp triggers a warning: </p> <pre class="wiki">#include &lt;boost/random/mersenne_twister.hpp&gt; int main() { return 0; } </pre><pre class="wiki">In file included from boost_1_49_0/include/boost/random/detail/large_arithmetic.hpp:19:0, from boost_1_49_0/include/boost/random/detail/const_mod.hpp:23, from boost_1_49_0/include/boost/random/detail/seed_impl.hpp:27, from boost_1_49_0/include/boost/random/mersenne_twister.hpp:29, from /tmp/always_inline.cpp:1: boost_1_49_0/include/boost/random/detail/integer_log2.hpp:71:35: warning: always_inline function might not be inlinable [-Wattributes] </pre><p> This warning is due to the missing inline keyword: </p> <pre class="wiki">--- boost_1_49_0.orig/boost/random/detail/integer_log2.hpp +++ boost_1_49_0/boost/random/detail/integer_log2.hpp @@ -27,7 +27,7 @@ #elif defined(BOOST_MSVC) #define BOOST_RANDOM_DETAIL_CONSTEXPR __forceinline #elif defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 4 -#define BOOST_RANDOM_DETAIL_CONSTEXPR __attribute__((const)) __attribute__((always_inline)) +#define BOOST_RANDOM_DETAIL_CONSTEXPR inline __attribute__((const)) __attribute__((always_inline)) #else #define BOOST_RANDOM_DETAIL_CONSTEXPR inline #endif </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6854 Trac 1.4.3 Steven Watanabe Sat, 19 May 2012 13:49:02 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6854#comment:1 https://svn.boost.org/trac10/ticket/6854#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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/78513" title="Add missing inline. Fixes #6854.">[78513]</a>) Add missing inline. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6854" title="#6854: Bugs: boost/random/detail/integer_log2.hpp:71:35: warning: always_inline ... (closed: fixed)">#6854</a>. </p> Ticket Mika Fischer <mika.fischer@…> Thu, 28 Jun 2012 15:04:18 GMT cc set https://svn.boost.org/trac10/ticket/6854#comment:2 https://svn.boost.org/trac10/ticket/6854#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">mika.fischer@…</span> added </li> </ul> Ticket anonymous Sun, 15 Jul 2012 21:39:20 GMT <link>https://svn.boost.org/trac10/ticket/6854#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6854#comment:3</guid> <description> <p> Why has this not landed in 1.50.0? </p> </description> <category>Ticket</category> </item> <item> <author>benjamin.mahler@…</author> <pubDate>Sun, 09 Sep 2012 18:04:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6854#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6854#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/6854#comment:3" title="Comment 3">anonymous</a>: </p> <blockquote class="citation"> <p> Why has this not landed in 1.50.0? </p> </blockquote> <p> Does not appear to be in 1.51.0 either.. </p> </description> <category>Ticket</category> </item> <item> <author>gromer@…</author> <pubDate>Wed, 07 Nov 2012 00:40:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6854#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6854#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/6854#comment:4" title="Comment 4">benjamin.mahler@…</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/6854#comment:3" title="Comment 3">anonymous</a>: </p> <blockquote class="citation"> <p> Why has this not landed in 1.50.0? </p> </blockquote> <p> Does not appear to be in 1.51.0 either.. </p> </blockquote> <p> Nor in 1.52.0. What gives? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 15 Nov 2012 17:09:03 GMT</pubDate> <title>status, version, severity changed; resolution deleted https://svn.boost.org/trac10/ticket/6854#comment:6 https://svn.boost.org/trac10/ticket/6854#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.49.0</span> → <span class="trac-field-new">Boost 1.52.0</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Cosmetic</span> → <span class="trac-field-new">Regression</span> </li> </ul> <p> Indeed, still not fixed in 1.52, reopening this ticket. </p> <p> Adding the suggested inline keyword to integer_log2.hpp fixes this. </p> <pre class="wiki">/tmp/boost_1_52_0$ /usr/bin/g++-4.7 -I./ -Werror main.cpp In file included from ./boost/random/detail/large_arithmetic.hpp:19:0, from ./boost/random/detail/const_mod.hpp:23, from ./boost/random/detail/seed_impl.hpp:27, from ./boost/random/mersenne_twister.hpp:29, from main.cpp:1: ./boost/random/detail/integer_log2.hpp:71:35: error: always_inline function might not be inlinable [-Werror=attributes] cc1plus: all warnings being treated as errors </pre> Ticket tdmackey@… Thu, 24 Jan 2013 19:33:14 GMT version changed https://svn.boost.org/trac10/ticket/6854#comment:7 https://svn.boost.org/trac10/ticket/6854#comment:7 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.52.0</span> → <span class="trac-field-new">Boost 1.53.0</span> </li> </ul> <p> This is still not fixed in 1.53.0 beta 1. </p> Ticket Marshall Clow Fri, 25 Jan 2013 17:06:10 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6854#comment:8 https://svn.boost.org/trac10/ticket/6854#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/82609" title="Merge bug fix to release; Fixes #6854">[82609]</a>) Merge bug fix to release; Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6854" title="#6854: Bugs: boost/random/detail/integer_log2.hpp:71:35: warning: always_inline ... (closed: fixed)">#6854</a> </p> Ticket