A partial answer to the question why Gnulib has no <stdatomic.h> replacement.


2023-11-13  Bruno Haible  <br...@clisp.org>

        doc: Add a note.
        * doc/posix-headers/stdatomic.texi: Add a note about the memory model.

diff --git a/doc/posix-headers/stdatomic.texi b/doc/posix-headers/stdatomic.texi
index d2368006bd..440dab625d 100644
--- a/doc/posix-headers/stdatomic.texi
+++ b/doc/posix-headers/stdatomic.texi
@@ -17,4 +17,8 @@
 @item
 This header file is missing on many platforms:
 glibc with GCC 4.8.x or clang 2.8, FreeBSD 6.4, NetBSD 7.0, OpenBSD 6.5, 
OpenBSD 6.9 with gcc, Minix 3.3.0, AIX 7.2 with xlc or xlclang, HP-UX 11.31, 
IRIX 6.5, Solaris 11.3 with Oracle Studio 12.4 (Sun C 5.13), Cygwin 1.5.19, 
mingw, MSVC 14.
+@item
+Linus Torvalds believes that
+``no compiler writer will get the C/C++ memory model right'';
+see @url{https://lkml.org/lkml/2018/6/7/761}.
 @end itemize




Reply via email to