[libcxx-commits] [libcxx] [libc++] "Always" include_next for non C++ path in stdatomic.h (PR #178463)
James Y Knight via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 28 08:58:22 PST 2026
================
@@ -231,7 +231,7 @@ using std::atomic_store_explicit _LIBCPP_USING_IF_EXISTS;
using std::atomic_signal_fence _LIBCPP_USING_IF_EXISTS;
using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS;
-# elif defined(_LIBCPP_COMPILER_CLANG_BASED)
+# else
----------------
jyknight wrote:
In _C++_ mode, this still shouldn't `#include_next <stdatomic.h>` for non-clang compilers, because a C-based stdatomic.h doesn't work in C++ mode under GCC. (Note that we're in the else condition of `# if defined(__cplusplus) && _LIBCPP_STD_VER >= 23` here).
I believe this should read: `# elif !defined(__cplusplus) || defined(_LIBCPP_COMPILER_CLANG_BASED)`
https://github.com/llvm/llvm-project/pull/178463
More information about the libcxx-commits
mailing list