Subject: [Boost-bugs] [Boost C++ Libraries] #6854: boost/random/detail/integer_log2.hpp:71:35: warning: always_inline function might not be inlinable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-01 23:28:13
#6854: boost/random/detail/integer_log2.hpp:71:35: warning: always_inline function
might not be inlinable
-------------------------------+--------------------------------------------
Reporter: peter@⦠| Owner: no-maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: random
Version: Boost 1.49.0 | Severity: Cosmetic
Keywords: |
-------------------------------+--------------------------------------------
When compiled with GCC 4.7.0, boost/random/detail/integer_log2.hpp
triggers a warning:
{{{
#include <boost/random/mersenne_twister.hpp>
int main() { return 0; }
}}}
{{{
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]
}}}
This warning is due to the missing inline keyword:
{{{
--- 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__) && __GNUC__ >= 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
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6854> 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:09 UTC