https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59930
--- Comment #4 from Nathan Sidwell <nathan at gcc dot gnu.org> --- Author: nathan Date: Mon Dec 18 16:30:58 2017 New Revision: 255780 URL: https://gcc.gnu.org/viewcvs?rev=255780&root=gcc&view=rev Log: [PR c++/59930] template friend injection https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01168.html PR c++/59930 * name-lookup.c (name_lookup::search_unqualified): Don't search parent namespace when looking for hidden things. * pt.c (tsubst_friend_class): Always push to friend scope, drop unneeded self-friend check. Inject new hidden friend into correct scope. PR c++/59930 * g++.dg/parse/pr81247-c.C: Adjust. * g++.dg/template/pr59930-[123].C: New. Added: trunk/gcc/testsuite/g++.dg/template/pr59930-1.C trunk/gcc/testsuite/g++.dg/template/pr59930-2.C trunk/gcc/testsuite/g++.dg/template/pr59930-3.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/name-lookup.c trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/parse/pr81247-c.C