PR c++/66533
* parser.c (cp_parser_primary_expression): Don't skip to the end
of the statement if we're parsing tentatively.
From-SVN: r226684
2015-08-06 Jason Merrill <jason@redhat.com>
+ PR c++/66533
+ * parser.c (cp_parser_primary_expression): Don't skip to the end
+ of the statement if we're parsing tentatively.
+
PR c++/67130
PR c++/67131
PR c++/66260
parser->greater_than_is_operator_p
= saved_greater_than_is_operator_p;
/* Consume the `)'. */
- if (!cp_parser_require (parser, CPP_CLOSE_PAREN, RT_CLOSE_PAREN))
+ if (!cp_parser_require (parser, CPP_CLOSE_PAREN, RT_CLOSE_PAREN)
+ && !cp_parser_uncommitted_to_tentative_parse_p (parser))
cp_parser_skip_to_end_of_statement (parser);
return expr;
--- /dev/null
+// PR c++/66533
+// { dg-do compile { target c++14 } }
+auto a([](auto) -> decltype((void)0) {});