Experiment with a fix for older versions of Clang.

This commit is contained in:
David Reid
2025-02-19 10:30:09 +10:00
parent e08c1303ef
commit 466a1354ce
+2
View File
@@ -14905,8 +14905,10 @@ typedef int ma_atomic_memory_order;
} }
#if defined(__clang__) #if defined(__clang__)
#pragma clang diagnostic push #pragma clang diagnostic push
#if __clang_major__ >= 8
#pragma clang diagnostic ignored "-Watomic-alignment" #pragma clang diagnostic ignored "-Watomic-alignment"
#endif #endif
#endif
static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired)
{ {
__atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);