[libcxx-commits] [libcxx] [libc++] Implement C++20 atomic_ref (PR #76647)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 2 11:33:06 PST 2024
https://github.com/huixie90 commented:
I have not yet reviewed the code. Just to bring up some issues we encountered previously:
there are some weird downstream setup. IIRC, there is Fushia where it is Linux but without gcc installed (thus cannot -latomic).
there is also Windows clang-cl which lacks of some builtins.
On Mac, do we have the gcc builtin at all? At least, on my old laptop all the code path are going through the c11 branch.
I’d also like to mention that I am working on several atomic related things, including making types with padding bytes in between member and/or after the tail works with atomic. (btw, does your atomic_ref compare_exchange_strong works for those types?) I don’t think we are allowed to touch the padding bits since atomic_ref does not own the object
Also the current c11_compare_exchange is broken for types whose size is not power of two. And I am also working on fixing that.
and I don’t think breaking existing std::atomic ABI is feasible. even though we could Abi tag std::atomic, there is no way we could tag user defined classes that contain std::atomic and appear in Abi boundary.
https://github.com/llvm/llvm-project/pull/76647
More information about the libcxx-commits
mailing list