mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
Previous implementations of fetch_min/max only supported integers, not handling pointers. To complete the paper, we need to implement support for pointers as well. This patch adds the missing functionality and test cases. libstdc++-v3/ChangeLog: * include/bits/atomic_base.h (__atomic_base<_PTp*>::fetch_min, __atomic_base<_PTp*>::fetch_max, __atomic_ref<_Pt, false, false, true>::fetch_min, __atomic_ref<_Pt, false, false, true>::fetch_max): Define new functions. * include/std/atomic (atomic<_Tp*>::fetch_min, atomic<_Tp*>::fetch_max): Likewise. (atomic_fetch_min_explicit, atomic_fetch_max_explicit, atomic_fetch_min, atomic_fetch_max): Change parameter from __atomic_base<_ITp>* to atomic<_Tp>*. * testsuite/29_atomics/atomic/pointer_fetch_minmax.cc: New test. * testsuite/29_atomics/atomic_ref/pointer_fetch_minmax.cc: New test.