diff --git a/doc/intrusive.qbk b/doc/intrusive.qbk index fbd6a93..cb76699 100644 --- a/doc/intrusive.qbk +++ b/doc/intrusive.qbk @@ -3870,6 +3870,13 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std [section:release_notes Release Notes] +[section:release_notes_boost_1_67_00 Boost 1.67 Release] + +* Fixed bugs: + * [@https://github.com/boostorg/intrusive/issues/29 GitHub Issues #29: ['Uninitialized variable warning pointer_plus_bits.hpp]] + +[endsect] + [section:release_notes_boost_1_65_00 Boost 1.65 Release] * Fixed bugs: diff --git a/include/boost/intrusive/pointer_plus_bits.hpp b/include/boost/intrusive/pointer_plus_bits.hpp index dfde66b..a39da32 100644 --- a/include/boost/intrusive/pointer_plus_bits.hpp +++ b/include/boost/intrusive/pointer_plus_bits.hpp @@ -22,6 +22,17 @@ # pragma once #endif + +//GCC reports uninitialized values when an uninitialized pointer plus bits type +//is asigned some bits or some pointer value, but that's ok, because we don't want +//to default initialize parts that are not being updated. +#if defined(BOOST_GCC) +# if (BOOST_GCC >= 40600) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wuninitialized" +# endif +#endif + namespace boost { namespace intrusive { @@ -89,6 +100,10 @@ struct pointer_plus_bits } //namespace intrusive } //namespace boost +#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) +# pragma GCC diagnostic pop +#endif + #include #endif //BOOST_INTRUSIVE_POINTER_PLUS_BITS_HPP