Fix PR c++/60627
PR c++/60627
* parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
introducing an implicit function template parameter within an explicit
instantiation.
PR c++/60627
* g++.dg/cpp1y/pr60627.C: New testcase.
From-SVN: r208799
+2014-03-24 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/60627
+ * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
+ introducing an implicit function template parameter within an explicit
+ instantiation.
+
2014-03-22 Jason Merrill <jason@redhat.com>
PR c++/60574
(void) cleanup;
- if (!processing_specialization && !processing_template_parmlist)
+ if (!processing_specialization
+ && !processing_template_parmlist
+ && !processing_explicit_instantiation)
if (!current_function_decl
|| (current_class_type && LAMBDA_TYPE_P (current_class_type)))
parser->auto_is_implicit_function_template_parm_p = true;
+2014-03-24 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/60627
+ * g++.dg/cpp1y/pr60627.C: New testcase.
+
2014-03-24 Alex Velenko <Alex.Velenko@arm.com>
* gcc.target/aarch64/ushr64_1.c: New.
--- /dev/null
+// PR c++/60627
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+template<typename T> void foo(T) {}
+
+template void foo(auto); // { dg-error "auto|does not match" }
+
+void bar()
+{
+ foo(0);
+}