diff --git a/include/boost/atomic/detail/config.hpp b/include/boost/atomic/detail/config.hpp index eb82032..efba5ae 100644 --- a/include/boost/atomic/detail/config.hpp +++ b/include/boost/atomic/detail/config.hpp @@ -80,7 +80,8 @@ #endif #endif // defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) -#if defined(__GNUC__) && (!defined(BOOST_INTEL_CXX_VERSION) || (BOOST_INTEL_CXX_VERSION+0) >= 1300) +#if (defined(__GNUC__) && (!defined(BOOST_INTEL_CXX_VERSION) || (BOOST_INTEL_CXX_VERSION+0) >= 1300)) ||\ + (defined(__has_attribute) && (__has_attribute(may_alias)+0) != 0) #define BOOST_ATOMIC_DETAIL_MAY_ALIAS __attribute__((__may_alias__)) #define BOOST_ATOMIC_DETAIL_STORAGE_MAY_ALIAS #elif defined(BOOST_MSVC)