https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69410

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:615c48b317397c2dc3d6769954d5c399ea882f7a

commit r12-9439-g615c48b317397c2dc3d6769954d5c399ea882f7a
Author: Jason Merrill <ja...@redhat.com>
Date:   Fri Mar 17 09:43:48 2023 -0400

    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.cc (do_friend): Handle namespace as scope argument.
            * decl.cc (grokdeclarator): Pass down in_namespace.

    gcc/testsuite/ChangeLog:

            * g++.dg/lookup/friend24.C: New test.

Reply via email to