On Fri, Apr 17, 2020 at 12:45:37PM -0400, Jason Merrill via Gcc-patches wrote:
> On 4/16/20 7:33 PM, Patrick Palka wrote:
> > 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.
> > 
> > Passes 'make check-c++', does this look OK to commit after 
> > bootstrap/regtesting?
> > 
> > gcc/cp/ChangeLog:
> > 
> >     PR c++/88754
> >     * parser. (cp_parser_check_template_parameters): Before issiung a hard

s/\. /.c/;s/issiung/issuing/

> >     error, first try simulating an error instead.

        Jakub

Reply via email to