[Bug libstdc++/88101] Implement P0528R3, C++20 cmpxchg and padding bits

rodgertq at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 15 20:03:58 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88101

--- Comment #4 from Thomas Rodgers <rodgertq at gcc dot gnu.org> ---
(In reply to andysem from comment #2)
> Another use case is C++20 atomic_ref, which may be bound to an object whose
> padding bits are in indeterminate state. An intrinsic to clear padding bits
> without altering the object value could be useful.

Having now implemented atomic<T>::wait for libstdc++, I think the intrinsic to
clear padding bits before calling __builtin_memcmp for generic (trivially
copyable) T's is the right approach.


More information about the Gcc-bugs mailing list