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

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

https://gcc.gnu.org/g:b6fd2fdd3887658e4212dc4945d8a41dd36cb21a

commit r17-656-gb6fd2fdd3887658e4212dc4945d8a41dd36cb21a
Author: Marek Polacek <[email protected]>
Date:   Mon May 18 20:51:06 2026 -0400

    c++: fix bogus error with xobj member function [PR125330]

    In this test since r17-472 we issue a bogus "not declared in this scope"
    error when parsing the requires because we failed to pushdecl.  Xobj
    parameters reuse the default argument field (in _parameter_declaration)
    so we also have to check this_identifier.

            PR c++/125330

    gcc/cp/ChangeLog:

            * parser.cc (cp_parser_parameter_declaration_list): Also
            pushdecl when parameter->default_argument is this_identifier.

    gcc/testsuite/ChangeLog:

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

    Reviewed-by: Jason Merrill <[email protected]>

Reply via email to