From fe8f1dc4e0e8ea708ecee06109b2e1f79c20f02d Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Wed, 1 Oct 2014 13:30:37 +0400 Subject: [PATCH] Use #pragma intrinsic only with MSVC. --- include/boost/atomic/detail/ops_msvc_x86.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/atomic/detail/ops_msvc_x86.hpp b/include/boost/atomic/detail/ops_msvc_x86.hpp index 308e0f2..501d9c6 100644 --- a/include/boost/atomic/detail/ops_msvc_x86.hpp +++ b/include/boost/atomic/detail/ops_msvc_x86.hpp @@ -44,8 +44,10 @@ #if defined(_MSC_VER) && (defined(_M_AMD64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2)) extern "C" void _mm_mfence(void); +#if defined(BOOST_MSVC) #pragma intrinsic(_mm_mfence) #endif +#endif namespace boost { namespace atomics {