aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-08-11 08:54:57 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2025-08-11 09:05:23 +0200
commit5274f490fa72830aafd278bc752145f1225b08e0 (patch)
treeeaae25c0fa22455f725dd22b4d07ae271ba222e8 /libjava/java
parentaf31db6461110dfb81efaf2a287327226ae5a7a8 (diff)
downloadgcc-5274f490fa72830aafd278bc752145f1225b08e0.zip
gcc-5274f490fa72830aafd278bc752145f1225b08e0.tar.gz
gcc-5274f490fa72830aafd278bc752145f1225b08e0.tar.bz2
c++: Implement mangling for structured binding packs [PR117783]
On Wed, Aug 06, 2025 at 11:53:55AM -0700, Jason Merrill wrote: > The Clang mangling of the underlying variable seems fine, just mentioning > the bound names; we can't get mangling collisions between pack and non-pack > versions of the same name. > > But It looks like they use .N discriminators for the individual elements, > which is wrong because . is reserved for implementation details. But I'd > think it should be fine to use [<discriminator>] instead. If you want the whole structured bindings to be mangled normally as if the pack isn't a pack and the individual vars of the structured binding pack mangled as multiple occurrences of the named entities, the following patch does that. 2025-08-11 Jakub Jelinek <jakub@redhat.com> PR c++/117783 * decl.cc (cp_finish_decomp): Don't sorry on tuple static structured bindings with a pack, instead temporarily reset DECL_NAME of the individual vars in the pack to the name of the pack for cp_finish_decl time and force mangling. * g++.dg/cpp26/decomp19.C: Don't expect sorry on tuple static structured bindings with a pack. * g++.dg/cpp26/decomp26.C: New test.
Diffstat (limited to 'libjava/java')
0 files changed, 0 insertions, 0 deletions