diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-09-02 15:29:22 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-09-02 18:21:23 +0100 |
commit | dba1ab212292839572fda60df00965e094a11252 (patch) | |
tree | 9d292593d984ed632dcf59597340339bdee601a2 /libgcc | |
parent | 5b73abd1a5f44f72e36bc7aefd423816083291ea (diff) | |
download | gcc-dba1ab212292839572fda60df00965e094a11252.zip gcc-dba1ab212292839572fda60df00965e094a11252.tar.gz gcc-dba1ab212292839572fda60df00965e094a11252.tar.bz2 |
libstdc++: Remove "no stronger" assertion in compare exchange [PR102177]
P0418R2 removed some preconditions from std::atomic::compare_exchange_*
but we still enforce them via __glibcxx_assert. This removes those
assertions.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
PR c++/102177
* include/bits/atomic_base.h (__is_valid_cmpexch_failure_order):
New function to check if a memory order is valid for the failure
case of compare exchange operations.
(__atomic_base<I>::compare_exchange_weak): Simplify assertions
by using __is_valid_cmpexch_failure_order.
(__atomic_base<I>::compare_exchange_strong): Likewise.
(__atomic_base<P*>::compare_exchange_weak): Likewise.
(__atomic_base<P*>::compare_exchange_strong): Likewise.
(__atomic_impl::compare_exchange_weak): Add assertion.
(__atomic_impl::compare_exchange_strong): Likewise.
* include/std/atomic (atomic::compare_exchange_weak): Likewise.
(atomic::compare_exchange_strong): Likewise.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions