From 4668476c6a1c64487d1ee75f61e165bd7fda940d Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 16 May 2020 14:47:30 +0200 Subject: [PATCH] Fix issue with old version of ICC --- m-atomic.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/m-atomic.h b/m-atomic.h index dc78fb1a..5f1d13ab 100644 --- a/m-atomic.h +++ b/m-atomic.h @@ -99,11 +99,17 @@ using std::memory_order_seq_cst; #define _Atomic(T) std::atomic< T > #elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \ - || ( defined(__GNUC__) && !defined(__clang__) && !defined(__cplusplus) && (__GNUC__*100 + __GNUC_MINOR__) >= 409) \ - || (defined(__clang__) && __clang_major__ >= 4) + || ( defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__cplusplus) && (__GNUC__*100 + __GNUC_MINOR__) >= 409) \ + || (defined(__clang__) && __clang_major__ >= 4) \ + || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1800) -/* CLANG 3.5 has issues with GCC's stdatomic.h - and doesn't provide its own stdatomic.h */ +/* C11 has mandatory working stdatomic + STDATOMIC doesn't work with C++ except for clang + GCC < 4.9 doesn't provide a compliant stdatomic.h + CLANG 3.5 has issues with GCC's stdatomic.h + and doesn't provide its own stdatomic.h + ICC < 18 doesn't provide a compliant stdatomic.h +*/ #include /* MSYS2 has a conflict between cdefs.h which defines a _Atomic macro (if not C11)