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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:6f43a8a08053a871e785e2ebc80383e0849efb6f

commit r12-5710-g6f43a8a08053a871e785e2ebc80383e0849efb6f
Author: Marek Polacek <pola...@redhat.com>
Date:   Tue Nov 30 16:43:19 2021 -0500

    c++: ICE with unnamed tparm and concept [PR103408]

    Here we crash when issuing the "constraint C has type T, not bool"
    error, because pp_cxx_parameter_mapping wasn't prepared to see an
    anonymous template parameter.  With this patch we print

    error: constraint 'auto(<lambda>) [with <unnamed> = 0]' has type
'<lambda()>', not 'bool'

    The "<unnamed>" is what this patch adds.

            PR c++/103408

    gcc/cp/ChangeLog:

            * cxx-pretty-print.c (pp_cxx_parameter_mapping): Print "<unnamed>"
            rather than crash on an unnamed template parameter.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp23/concepts-err1.C: New test.

Reply via email to