From 16fca8368b5da14c4bcad977c2738dc6e482e1b7 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 30 May 2022 20:25:13 +0300 Subject: [PATCH] Keep -Wmaybe-uninitialized disabled --- include/boost/function/function_template.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 3f1097a..dcfc8f0 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -905,10 +905,10 @@ namespace boost { # pragma GCC diagnostic push // This warning is technically correct, but we don't want to pay the price for initializing // just to silence a warning: https://github.com/boostorg/function/issues/27 +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" # if (BOOST_GCC >= 120000) + // GCC 12 emits a different warning: https://github.com/boostorg/function/issues/42 # pragma GCC diagnostic ignored "-Wuninitialized" -# else -# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" # endif # endif std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer)); @@ -1007,10 +1007,10 @@ namespace boost { # pragma GCC diagnostic push // This warning is technically correct, but we don't want to pay the price for initializing // just to silence a warning: https://github.com/boostorg/function/issues/27 +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" # if (BOOST_GCC >= 120000) + // GCC 12 emits a different warning: https://github.com/boostorg/function/issues/42 # pragma GCC diagnostic ignored "-Wuninitialized" -# else -# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" # endif # endif std::memcpy(this->functor.data, f.functor.data, sizeof(this->functor.data));