From 3be89a29107caf9e010cdb20ca88b5133d3e4ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Wed, 24 Aug 2022 14:26:52 +0200 Subject: [PATCH] Disable "-Wmaybe-uninitialized" for false positives in the core section --- include/boost/container/string.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index fbe0986..fa69cb8 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -65,7 +65,6 @@ #include //for std::initializer_list #endif - namespace boost { namespace container { @@ -131,6 +130,11 @@ class basic_string_base private: + #if defined(BOOST_GCC) && (BOOST_GCC >= 40600) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" + #endif + //This is the structure controlling a long string struct long_t { @@ -164,6 +168,11 @@ class basic_string_base } }; + #if defined(BOOST_GCC) && (BOOST_GCC >= 40600) + #pragma GCC diagnostic pop + #endif + + //This type is the first part of the structure controlling a short string //The "data" member stores struct short_header @@ -3580,6 +3589,7 @@ inline std::size_t hash_value(basic_string, Allocator> }} + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED namespace boost {