https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120917
--- Comment #28 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:d1c92ea10d30e4cf359faa8bbe3782ed6173d8a9 commit r16-2148-gd1c92ea10d30e4cf359faa8bbe3782ed6173d8a9 Author: Jason Merrill <ja...@redhat.com> Date: Wed Jul 9 11:03:31 2025 -0400 c++: generic lambda in template arg [PR121012] My r16-2065 adding missed errors for auto in a template arg in a lambda parameter also introduced a bogus error on this testcase, where the auto is both in a lambda parameter and in a template arg, but in the other order, which is OK. So we should clear in_template_argument_list_p for lambdas like we do so many other parser flags. PR c++/121012 PR c++/120917 gcc/cp/ChangeLog: * parser.cc (cp_parser_lambda_expression): Clear parser->in_template_argument_list_p. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-targ17.C: New test.