https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100134
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathaniel Shead <[email protected]>: https://gcc.gnu.org/g:2fbb6b2618e5220c049d889768b3aa3d48fda2ca commit r16-5142-g2fbb6b2618e5220c049d889768b3aa3d48fda2ca Author: Nathaniel Shead <[email protected]> Date: Mon Nov 10 23:41:25 2025 +1100 c++/modules: Propagate purviewness to all parent namespaces In PR c++/100134, tsubst_friend_function was adjusted to ensure that instantiating a friend function in an unopened namespace still correctly marked the namespace as purview. This adjusts the fix to also apply to nested namespaces. gcc/cp/ChangeLog: * pt.cc (tsubst_friend_function): Mark all parent namespaces as purview if needed. gcc/testsuite/ChangeLog: * g++.dg/modules/tpl-friend-8_a.H: Add testcase. * g++.dg/modules/tpl-friend-8_b.C: Add testcase. Signed-off-by: Nathaniel Shead <[email protected]>
