]> gcc.gnu.org Git - gcc.git/commit
c++: namespace-scoped friend in local class [PR69410]
authorJason Merrill <jason@redhat.com>
Fri, 17 Mar 2023 13:43:48 +0000 (09:43 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 21 Apr 2023 20:27:04 +0000 (16:27 -0400)
commitfc03893d2fead133ed336511ac00d75c10c5a88d
treeccb640ba5b9d4c918069ee1fd99a01fff117395d
parent6f7f90113bc78440a248bef4b917583fde3e6e5f
c++: namespace-scoped friend in local class [PR69410]

do_friend was only considering class-qualified identifiers for the
qualified-id case, but we also need to skip local scope when there's an
explicit namespace scope.

PR c++/69410

gcc/cp/ChangeLog:

* friend.c (do_friend): Handle namespace as scope argument.
* decl.c (grokdeclarator): Pass down in_namespace.

gcc/testsuite/ChangeLog:

* g++.dg/lookup/friend24.C: New test.
gcc/cp/decl.c
gcc/cp/friend.c
gcc/testsuite/g++.dg/lookup/friend24.C [new file with mode: 0644]
This page took 0.062515 seconds and 6 git commands to generate.