diff --git a/test/int_holder.hpp b/test/int_holder.hpp index 5ae2272..8f276c9 100644 --- a/test/int_holder.hpp +++ b/test/int_holder.hpp @@ -12,7 +12,13 @@ #ifndef BOOST_INTRUSIVE_DETAIL_INT_HOLDER_HPP #define BOOST_INTRUSIVE_DETAIL_INT_HOLDER_HPP -#include +#include + +//GCC has some false array_bounds warnings starting in GCC 12 +#if defined(BOOST_CLANG) || (defined(BOOST_GCC) && (BOOST_GCC >= 120000)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif struct int_holder { @@ -108,4 +114,9 @@ struct int_priority_of_value { return tv.int_value(); } }; +//GCC has some false array_bounds warnings starting in GCC 12 +#if defined(BOOST_CLANG) || (defined(BOOST_GCC) && (BOOST_GCC >= 120000)) +#pragma GCC diagnostic pop +#endif + #endif //BOOST_INTRUSIVE_DETAIL_INT_HOLDER_HPP