Skip to content

Commit 1325ee6

Browse files
committed
avoid warning on newer clang
1 parent cfacbac commit 1325ee6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/mimalloc/atomic.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ terms of the MIT license. A copy of the license can be found in the file
2323
#define _Atomic(tp) std::atomic<tp>
2424
#define mi_atomic(name) std::atomic_##name
2525
#define mi_memory_order(name) std::memory_order_##name
26-
#if !defined(ATOMIC_VAR_INIT) || (__cplusplus >= 202002L) // c++20, see issue #571
27-
#define MI_ATOMIC_VAR_INIT(x) x
26+
#if (__cplusplus >= 202002L) // c++20, see issue #571
27+
#define MI_ATOMIC_VAR_INIT(x) x
28+
#elif !defined(ATOMIC_VAR_INIT)
29+
#define MI_ATOMIC_VAR_INIT(x) x
2830
#else
2931
#define MI_ATOMIC_VAR_INIT(x) ATOMIC_VAR_INIT(x)
3032
#endif

0 commit comments

Comments
 (0)