+2010-08-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/44991
+ * parser.c (cp_parser_parameter_declaration): Pop parameter decls
+ after tentative parsing.
+
2010-08-22 Joseph Myers <joseph@codesourcery.com>
* Make-lang.in (g++spec.o): Update dependencies.
the default argument; otherwise the default
argument continues. */
bool error = false;
+ tree t;
/* Set ITALP so cp_parser_parameter_declaration_list
doesn't decide to commit to this parse. */
cp_parser_parse_tentatively (parser);
cp_lexer_consume_token (parser->lexer);
+ begin_scope (sk_function_parms, NULL_TREE);
cp_parser_parameter_declaration_list (parser, &error);
+ for (t = current_binding_level->names; t; t = DECL_CHAIN (t))
+ pop_binding (DECL_NAME (t), t);
+ leave_scope ();
if (!cp_parser_error_occurred (parser) && !error)
done = true;
cp_parser_abort_tentative_parse (parser);