]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Replace uses of EBO with [[no_unique_address]]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 5 May 2026 12:39:24 +0000 (13:39 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 6 May 2026 14:14:00 +0000 (15:14 +0100)
commitc30bf3aee78bbe9bd557c7bcd5d2d5533f6a216e
tree3bdf4fd78fb79b2e912ccf467e24c14c389801a7
parent554f7b2d55348a12fd4145ce8173c9123e91aa29
libstdc++: Replace uses of EBO with [[no_unique_address]]

Clang 9 added support for [[__no_unique_address__]] and we don't support
Intel icc any longer, so we can remove the code in <tuple> that works
around the absence of that attribute. We can also address a FIXME in
<bits/shared_ptr_base.h> and replace uses of EBO with the attribute.

libstdc++-v3/ChangeLog:

* include/bits/shared_ptr_base.h (_Sp_ebo_helper): Simplify by
using [[__no_unique_address__]] instead of EBO. Use the
attribute unconditionally for the unstable ABI.
(_Sp_counted_deleter::_Impl): Adjust uses of _Sp_ebo_helper.
(_Sp_counted_ptr_inplace::_Impl): Likewise.
* include/std/tuple (_Head_base): Remove implementation for
compilers that don't support [[__no_unique_address__]]. Use the
attribute unconditionally for the unstable ABI.

Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
libstdc++-v3/include/bits/shared_ptr_base.h
libstdc++-v3/include/std/tuple