aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2023-02-01 17:00:48 -0500
committerJason Merrill <jason@redhat.com>2023-04-26 17:16:21 -0400
commit1e27e7e0985e055b3d4ec92e93976b709fdbe425 (patch)
tree3bb453a340838375b0cf5ceb5a58f9d38c6f9252 /libgcc
parent50d866038a910ceb9075b97295a12d77a8d09a3a (diff)
downloadgcc-1e27e7e0985e055b3d4ec92e93976b709fdbe425.zip
gcc-1e27e7e0985e055b3d4ec92e93976b709fdbe425.tar.gz
gcc-1e27e7e0985e055b3d4ec92e93976b709fdbe425.tar.bz2
c++: unique friend shenanigans [PR69836]
Normally we re-instantiate a function declaration when we start to instantiate the body in case of multiple declarations. In this wacky testcase, this causes a problem because the type of the w_counter parameter depends on its declaration not being in scope yet, so the name lookup only finds the previous declaration. This isn't a problem for member functions, since they aren't subject to argument-dependent lookup. So let's just skip the regeneration for hidden friends. PR c++/69836 gcc/cp/ChangeLog: * pt.cc (regenerate_decl_from_template): Skip unique friends. gcc/testsuite/ChangeLog: * g++.dg/template/friend76.C: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions