From 5b1909eba491c453465535c8c7f0bc700d34a4f0 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 14 Jun 2021 02:15:37 +0300 Subject: [PATCH] Disable -Wstrict-aliasing on g++ 6 and below --- include/boost/system/detail/error_code.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/system/detail/error_code.hpp b/include/boost/system/detail/error_code.hpp index 66849b4..e434b42 100644 --- a/include/boost/system/detail/error_code.hpp +++ b/include/boost/system/detail/error_code.hpp @@ -29,6 +29,11 @@ # include #endif +#if defined(BOOST_GCC) && BOOST_GCC < 60000 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + namespace boost { @@ -397,4 +402,8 @@ inline std::size_t hash_value( error_code const & ec ) } // namespace boost +#if defined(BOOST_GCC) && BOOST_GCC < 60000 +# pragma GCC diagnostic pop +#endif + #endif // #ifndef BOOST_SYSTEM_DETAIL_ERROR_CODE_HPP_INCLUDED