]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Revert change to __bitwise_relocatable
authorJonathan Wakely <jwakely@redhat.com>
Tue, 10 Dec 2024 09:48:57 +0000 (09:48 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 10 Dec 2024 10:32:15 +0000 (10:32 +0000)
commit4b9e1db1a14dbfc0b9a3cf9321fda4c041553b3a
tree393cc616086beb9cbd0fd884fbe1546c7df841b0
parent233972ab3b5338d7a5d1d7af9108c1f366170e44
libstdc++: Revert change to __bitwise_relocatable

This reverts r15-6060-ge4a0157c2397c9 so that __is_bitwise_relocatable
depends only on is_trivial. To avoid the deprecation warnings for C++26,
use the __is_trivial built-in directly instead of std::is_trivial.

We need to be sure that the type is trivially copyable, not just
trivially constructible and trivially assignable. Otherwise we get
-Wclass-memaccess diagnostics for e.g. std::vector<std::pair<A*, B*>>.
We could add is_trivially_copyable to the conditions, but this isn't
really an appropriate change for stage 3 anyway (it affects all modes
from C++11 upwards). Just revert to using is_trivial, and we can revisit
the condition for GCC 16.

libstdc++-v3/ChangeLog:

* include/bits/stl_uninitialized.h (__is_bitwise_relocatable):
Revert to depending on is_trivial.
libstdc++-v3/include/bits/stl_uninitialized.h