PR c++/63455
Revert:
* parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
committed to this tentative parse.
From-SVN: r216277
2014-10-15 Jason Merrill <jason@redhat.com>
+ PR c++/63455
+ Revert:
+ * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
+ committed to this tentative parse.
+
PR c++/63415
* pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
(iterative_hash_template_arg): Likewise.
static void
cp_parser_abort_tentative_parse (cp_parser* parser)
{
- gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
- || errorcount > 0);
cp_parser_simulate_error (parser);
/* Now, pretend that we want to see if the construct was
successfully parsed. */
--- /dev/null
+// PR c++/63455
+// { dg-options "-std=gnu++11" }
+
+int main()
+{
+ int x = 0;
+
+ // without '+0', gcc 4.6 gives a different error (no ICE though)
+ decltype(({ int y = x; y; })+0) v1 = 0;
+}