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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <[email protected]>:

https://gcc.gnu.org/g:9971faf312bfa502d8c983b528f80e4538cfefaf

commit r17-3994-g9971faf312bfa502d8c983b528f80e4538cfefaf
Author: Lunex <[email protected]>
Date:   Fri Sep 4 18:26:35 2026 +0600

    c++: friend with explicit object parameter [PR122258]

    A friend which is not a member but 'this Self &&' was used on that that
    is only for members. GCC failed to check and later it crashed with no
access
    info to check.

    Now we just reject only [non-member]friend that uses an explicit object
    parameter.

            PR c++/122258

    gcc/cp/ChangeLog:

            * decl.cc (grokdeclarator): Extend non-member explicit object
            parameter check to include unqualified friends and clear
            is_xobj_member_function.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp23/explicit-obj-diagnostics13.C: New test.

    Co-authored-by: Jason Merrill <[email protected]>

Reply via email to