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

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Marek Polacek
<mpola...@gcc.gnu.org>:

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

commit r14-11163-ge6dfe71f5a0e43e8c35460d09af16eff93756dfd
Author: Marek Polacek <pola...@redhat.com>
Date:   Wed Sep 18 15:44:31 2024 -0400

    c++: concept in default argument [PR109859]

    1) We're hitting the assert in cp_parser_placeholder_type_specifier.
    It says that if it turns out to be false, we should do error() instead.
    Do so, then.

    2) lambda-targ8.C should compile fine, though.  The problem was that
    local_variables_forbidden_p wasn't cleared when we're about to parse
    the optional template-parameter-list for a lambda in a default argument.

            PR c++/109859

    gcc/cp/ChangeLog:

            * parser.cc (cp_parser_lambda_declarator_opt): Temporarily clear
            local_variables_forbidden_p.
            (cp_parser_placeholder_type_specifier): Turn an assert into an
            error.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-defarg3.C: New test.
            * g++.dg/cpp2a/lambda-targ8.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>
    (cherry picked from commit 4bcfaaed25b1b8ecc81f6a28d9ca76f00870dedf)
  • [Bug c++/109859] [12/13/14 Regr... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to