Suppress strict-aliasing warning for gcc 4.8 to 6

This commit is contained in:
Peter Dimov
2022-04-21 21:06:14 +03:00
parent 98439855bd
commit 616e652bd7

View File

@ -139,6 +139,11 @@ inline BOOST_NOINLINE void error_category::init_stdcat() const
}
}
#if defined( BOOST_GCC ) && BOOST_GCC >= 40800 && BOOST_GCC < 70000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif
inline error_category::operator std::error_category const & () const
{
if( id_ == detail::generic_category_id )
@ -179,6 +184,10 @@ inline error_category::operator std::error_category const & () const
return *static_cast<boost::system::detail::std_category const*>( static_cast<void const*>( stdcat_ ) );
}
#if defined( BOOST_GCC ) && BOOST_GCC >= 40800 && BOOST_GCC < 70000
#pragma GCC diagnostic pop
#endif
} // namespace system
} // namespace boost