On 2014-03-07 17:29, Jason Merrill wrote:
On 03/04/2014 04:46 PM, Adam Butcher wrote:
PR c++/60393
* parser.c (cp_parser_parameter_declaration_clause): Move generic
function template unwinding on error into a move general location,
...
(cp_parser_error): ... here.
Hmm, I'm uncomfortable with this change; not all errors lead to
unwinding the whole declaration context. Typically they just mean
we're changing from one tentative parse to another. If for instance
you had a function with one generic parameter and one with a type
like
A<42>, we would try to parse 42 as a type and hit cp_parser_error
before parsing it as an expression.
Ah right. I did wonder about tentative parsing. What about in
cp_parser_skip_to_end_of_statement?
Alternative seems to be that we explicitly handle each case.