Skip to content

Commit 9a0d391

Browse files
committed
stdatomic: make atomics compatible with GCC-14
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631525.html brings c_atomic and cxx_atomic definitions into GCC. This patch makes atomics type detection correct for GCC. freebsd/freebsd-src@680f40f
1 parent 047ba47 commit 9a0d391

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

newlib/libc/include/stdatomic.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
#include <stdint.h>
4444
#endif
4545

46-
#if __has_extension(c_atomic) || __has_extension(cxx_atomic)
46+
#if (__has_extension(c_atomic) || __has_extension(cxx_atomic)) && \
47+
defined(__clang__)
4748
#define __CLANG_ATOMICS
4849
#elif __GNUC_PREREQ__(4, 7)
4950
#define __GNUC_ATOMICS

0 commit comments

Comments
 (0)