From 665c9f32e195c1b636ca36d678a54075af39760d Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 24 Jan 2023 21:52:19 -0600 Subject: [PATCH] Boost: apply an upstream patch to silence -Wnonnull warnings This commit applies boost upstream patch: From affc79e04514b4cc4177967ced85f7674f3a6642 Mon Sep 17 00:00:00 2001 From: "Romain Geissler @ Amadeus" <...> Date: Thu, 4 Mar 2021 03:23:14 +0100 Subject: [PATCH] Ignore -Wnonnull new gcc 11 warnings. (#28) --- .../include/boost/concept/detail/general.hpp | 21 +++++++++++++++++++ .../include/boost/concept/usage.hpp | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/bundled/boost-1.70.0/include/boost/concept/detail/general.hpp b/bundled/boost-1.70.0/include/boost/concept/detail/general.hpp index eeb08750f1..8d7d6f696e 100644 --- a/bundled/boost-1.70.0/include/boost/concept/detail/general.hpp +++ b/bundled/boost-1.70.0/include/boost/concept/detail/general.hpp @@ -28,7 +28,14 @@ namespace detail template struct requirement { +# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wnonnull" +# endif static void failed() { ((Model*)0)->~Model(); } +# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) +# pragma GCC diagnostic pop +# endif }; struct failed {}; @@ -36,7 +43,14 @@ struct failed {}; template struct requirement { +# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wnonnull" +# endif static void failed() { ((Model*)0)->~Model(); } +# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) +# pragma GCC diagnostic pop +# endif }; # ifdef BOOST_OLD_CONCEPT_SUPPORT @@ -44,7 +58,14 @@ struct requirement template struct constraint { +# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wnonnull" +# endif static void failed() { ((Model*)0)->constraints(); } +# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) +# pragma GCC diagnostic pop +# endif }; template diff --git a/bundled/boost-1.70.0/include/boost/concept/usage.hpp b/bundled/boost-1.70.0/include/boost/concept/usage.hpp index 373de63a9d..fe88b5f5a7 100644 --- a/bundled/boost-1.70.0/include/boost/concept/usage.hpp +++ b/bundled/boost-1.70.0/include/boost/concept/usage.hpp @@ -13,7 +13,14 @@ namespace boost { namespace concepts { template struct usage_requirements { +# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wnonnull" +# endif ~usage_requirements() { ((Model*)0)->~Model(); } +# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) +# pragma GCC diagnostic pop +# endif }; # if BOOST_WORKAROUND(__GNUC__, <= 3) -- 2.39.5