[libcxx-commits] [PATCH] D97044: [libc++] [C++2b] [P0943] Add stdatomic.h header.

Hubert Tong via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 9 08:39:58 PST 2022


hubert.reinterpretcast added a comment.

In D97044#3308006 <https://reviews.llvm.org/D97044#3308006>, @ldionne wrote:

> @hubert.reinterpretcast I am wondering whether it's a good idea to fall back
> to the Clang provided <stdatomic.h> on older C++ standards. It seems to me that
> if you're compiling as C++, we should be providing a strictly conforming behavior
> and not trying to provide some maybe-not-entirely-working fall-backs in previous
> Standard modes. Any thoughts?

Clang seems to have had the not-entirely-working behaviour as a deliberate extension (with compiler-level support for `_Atomic`).
It appears that users have made use of it with the older C++ modes.

My understanding is that such cases led to a Clang-only fallback in libstdc++.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97044/new/

https://reviews.llvm.org/D97044



More information about the libcxx-commits mailing list