* cp/parser.c (cp_parser_lambda_expression): Save/reset/restore
auto_is_implicit_function_template_parm_p around lambda body.
+ PR c++/59638
+ * cp/parser.c (cp_parser_init_declarator): Undo fully implicit
+ template parameter list when declarator is not a function.
+
2014-01-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/58950
warning (OPT_Wattributes,
"attributes after parenthesized initializer ignored");
+ /* A non-template declaration involving a function parameter list containing
+ an implicit template parameter will have been made into a template. If it
+ turns out that the resulting declaration is not an actual function then
+ finish the template declaration here. An error message will already have
+ been issued. */
+ if (parser->fully_implicit_function_template_p)
+ if (!function_declarator_p (declarator))
+ finish_fully_implicit_template (parser, /*member_decl_opt=*/0);
+
/* For an in-class declaration, use `grokfield' to create the
declaration. */
if (member_p)
PR c++/59635
PR c++/59636
PR c++/59629
+ PR c++/59638
* g++.dg/cpp1y/pr59635.C: New testcase.
* g++.dg/cpp1y/pr59636.C: New testcase.
* g++.dg/cpp1y/pr59629.C: New testcase.
+ * g++.dg/cpp1y/pr59638.C: New testcase.
2014-01-06 Martin Jambor <mjambor@suse.cz>
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=gnu++1y" }
+
+// PR c++/59638
+
+
+void (*a)(auto); // { dg-error "template declaration" }
+
+void (*b)(auto) = 0; // { dg-error "template declaration" }
+
+typedef void (*f)(auto); // { dg-error "template declaration" }
+
+struct A
+{
+ int i;
+};