[libcxx-commits] [libcxx] [libc++][Android] Always redirect <stdatomic.h> to <atomic> (PR #143036)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 29 08:18:41 PDT 2026


ldionne wrote:

> There has been a lot of discussion arguing that the C++23 spec essentially forces ODR violations. IMO, that depends on your perspective. If you view C code as also C++ code, i.e. view C as a subset of C++, then ODR violations in a C union C++ program make sense.

I think my claims are that it forces ODR violations across C++ versions itself given the existence of Clang's extension. In pure C++ code, `_Atomic(T)` is a builtin type (the Clang extension) in C++17, but it can be `std::atomic<T>` (a standard library type) in C++23. I agree that ODR violations between C and C++ are more philosophical.

https://github.com/llvm/llvm-project/pull/143036


More information about the libcxx-commits mailing list