diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index b9c590d..f1d7ddb 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -155,7 +155,7 @@ template<> struct is_error_condition_enum }; // class error_category -#if defined( BOOST_GCC ) || defined( BOOST_CLANG ) +#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG ) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" #endif @@ -318,7 +318,7 @@ public: } // namespace detail -#if defined( BOOST_GCC ) || defined( BOOST_CLANG ) +#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG ) #pragma GCC diagnostic pop #endif