gcc/libstdc++-v3/testsuite/29_atomics
Jonathan Wakely 500046d178
libstdc++: Fix test FAIL due to -Wpointer-arith
This fixes a FAIL due to a -Wpointer-arith warning when testing with
c++11 or c++14 dialects. As an extension our std::atomic<void*> supports
pointer arithmetic in C++11 and C++14, but due to the system header
changes there is now a warning about it. The warning seems reasonable,
so rather than suppress it we should make the test expect it.

While looking into this I decided to simplify some of the code related
to atomic<T*> arithmetic.

libstdc++-v3/ChangeLog:

	* include/bits/atomic_base.h (__atomic_base<T*>::_M_type_size):
	Replace overloaded functions with static _S_type_size.
	* include/std/atomic (atomic<T*>): Use is_object_v instead of
	is_object.
	* testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
	Add dg-warning for -Wpointer-arith warning.
2024-09-27 16:28:12 +01:00
..
atomic libstdc++: Fix test FAIL due to -Wpointer-arith 2024-09-27 16:28:12 +01:00
atomic_flag
atomic_float
atomic_integral
atomic_ref
headers