diff options
author | Marek Polacek <polacek@redhat.com> | 2024-09-18 15:44:31 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2024-09-30 15:20:31 -0400 |
commit | 4bcfaaed25b1b8ecc81f6a28d9ca76f00870dedf (patch) | |
tree | bab5c07fc8397dd14661f2e4ac5c72b6ab7b8997 /include/gdb/gdb-index.h | |
parent | 65073a5b90c00a1c47efae8a67b9c754e2287ee0 (diff) | |
download | gcc-4bcfaaed25b1b8ecc81f6a28d9ca76f00870dedf.zip gcc-4bcfaaed25b1b8ecc81f6a28d9ca76f00870dedf.tar.gz gcc-4bcfaaed25b1b8ecc81f6a28d9ca76f00870dedf.tar.bz2 |
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 <jason@redhat.com>
Diffstat (limited to 'include/gdb/gdb-index.h')
0 files changed, 0 insertions, 0 deletions