Fix PR c++/60377.
PR c++/60377
* parser.c (cp_parser_parameter_declaration_clause): Unwind generic
function scope on parse error in function parameter list.
PR c++/60377
* g++.dg/cpp1y/pr60377.C: New testcase.
From-SVN: r208250
+2014-03-01 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/60377
+ * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
+ function scope on parse error in function parameter list.
+
2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
* method.c (implicitly_declare_fn): Remove redundant
parameter-declaration-list, then the entire
parameter-declaration-clause is erroneous. */
if (is_error)
- return NULL;
+ {
+ /* Unwind generic function template scope if necessary. */
+ if (parser->fully_implicit_function_template_p)
+ finish_fully_implicit_template (parser, /*member_decl_opt=*/0);
+ return NULL;
+ }
/* Peek at the next token. */
token = cp_lexer_peek_token (parser->lexer);
+2014-03-01 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/60377
+ * g++.dg/cpp1y/pr60377.C: New testcase.
+
2014-03-01 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/60341
--- /dev/null
+// PR c++/60377
+// { dg-options -std=c++1y }
+
+void foo(auto, void (f*)()); // { dg-error "expected" }
+
+struct A
+{
+ int i;
+};