From 0aa832cf18d3d6f01f84fa86397c2f94f9669494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Wed, 18 Jan 2023 23:55:44 +0100 Subject: [PATCH] Disable "-Warray-bounds" for GCC12 due to false positives --- include/boost/container/string.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index fa69cb8..1a5e893 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -65,6 +65,13 @@ #include //for std::initializer_list #endif +//GCC 12 has a regression for array-bounds warnings +#if defined(BOOST_GCC) && (BOOST_GCC >= 120000) && (BOOST_GCC < 130000) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + + namespace boost { namespace container { @@ -3589,6 +3596,11 @@ inline std::size_t hash_value(basic_string, Allocator> }} +//GCC 12 has a regression for array-bounds warnings +#if defined(BOOST_GCC) && (BOOST_GCC >= 120000) && (BOOST_GCC < 130000) +#pragma GCC diagnostic pop +#endif + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED