aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2020-04-16 16:45:15 -0400
committerPatrick Palka <ppalka@redhat.com>2020-04-17 13:58:52 -0400
commit3f5af3f71195b7f1ebe32bd0d695b59904fff778 (patch)
tree8496bacd99f361bf77fcf1a966edf35a0c2663b3 /gcc/cp/lambda.c
parent2298af0800b292f028298c1eaec42fd3033c4b9b (diff)
downloadgcc-3f5af3f71195b7f1ebe32bd0d695b59904fff778.zip
gcc-3f5af3f71195b7f1ebe32bd0d695b59904fff778.tar.gz
gcc-3f5af3f71195b7f1ebe32bd0d695b59904fff778.tar.bz2
c++: Hard error with tentative parse of declaration [PR88754]
In the testcase for this PR, we try to parse the statement A(value<0>()); first tentatively as a declaration (with a parenthesized declarator), and during this tentative parse we end up issuing a hard error from cp_parser_check_template_parameters about its invalidness as a declaration. Rather than issuing a hard error, it seems we should instead simulate an error since we're parsing tentatively. This would then allow cp_parser_statement to recover and successfully parse the statement as an expression-statement instead. gcc/cp/ChangeLog: PR c++/88754 * parser.c (cp_parser_check_template_parameters): Before issuing a hard error, first try simulating an error instead. gcc/testsuite/ChangeLog: PR c++/88754 * g++.dg/parse/ambig10.C: New test.
Diffstat (limited to 'gcc/cp/lambda.c')
0 files changed, 0 insertions, 0 deletions