From 9554d8bbd3203ffbcf054d0de50d3539ad66fba7 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 3 Feb 2022 19:02:19 +0200 Subject: [PATCH] Suppress incorrect warnings from GCC 7/8 --- include/boost/system/result.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/system/result.hpp b/include/boost/system/result.hpp index 4872c7e..aa581c2 100644 --- a/include/boost/system/result.hpp +++ b/include/boost/system/result.hpp @@ -27,6 +27,11 @@ namespace system // throw_exception_from_error +#if defined(__GNUC__) && __GNUC__ >= 7 && __GNUC__ <= 8 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +#endif + BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( error_code const & e ) { boost::throw_exception( system_error( e ) ); @@ -37,6 +42,10 @@ BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( std::error boost::throw_exception( std::system_error( e ) ); } +#if defined(__GNUC__) && __GNUC__ >= 7 && __GNUC__ <= 8 +# pragma GCC diagnostic pop +#endif + // in_place_* using in_place_value_t = variant2::in_place_index_t<0>;