-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Description
libc++ 15.0.0 added the new stdatomic.h
file: https://github.com/llvm/llvm-project/blob/llvmorg-15.0.0/libcxx/include/stdatomic.h
This file has a before C++23 compatibility code which should include other stdatomic.h
file shipped elsewhere: https://github.com/llvm/llvm-project/blob/llvmorg-15.0.0/libcxx/include/stdatomic.h#L223-L231.
Unfortunately, this is not triggered when in C mode, because the _LIBCPP_COMPILER_CLANG_BASED
is only set in __config
within an #ifdef __cplusplus
region: https://github.com/llvm/llvm-project/blob/llvmorg-15.0.0/libcxx/include/__config#L25
Most other header files that should be working from C code as well use #include_next
directives unconditionally or when __cplusplus
is not defined. Here are some working examples: