Fix uncompliant m-atomic support

if __STDC_NO_ATOMICS__ is defined, then in C11, there is no stdatomic header
This commit is contained in:
Patrick Pelissier committed 2020-07-04 23:34:24 +02:00
1 parent d2b0873a95
commit 71cec5155a
1 file changed
+2 -2
+2 -2
View File
@@ -99,12 +99,12 @@ using std::memory_order_seq_cst;
#define _Atomic(T) std::atomic< T >
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__) ) \
|| ( 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)
/* C11 has mandatory working stdatomic
/* C11 with 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