+2014-02-21 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/60052
+ PR c++/60053
+ * parser.c (cp_parser_parameter_declaration_list): Correctly reset
+ implicit_template_scope upon leaving an out-of-line generic member
+ function definition.
+
2014-02-20 Kai Tietz <ktietz@redhat.com>
PR c++/58873
parser->in_unbraced_linkage_specification_p
= saved_in_unbraced_linkage_specification_p;
+ /* Reset implicit_template_scope if we are about to leave the function
+ parameter list that introduced it. Note that for out-of-line member
+ definitions, there will be one or more class scopes before we get to
+ the template parameter scope. */
+
if (cp_binding_level *its = parser->implicit_template_scope)
- if (current_binding_level->level_chain == its)
+ if (cp_binding_level *maybe_its = current_binding_level->level_chain)
{
- parser->implicit_template_parms = 0;
- parser->implicit_template_scope = 0;
+ while (maybe_its->kind == sk_class)
+ maybe_its = maybe_its->level_chain;
+ if (maybe_its == its)
+ {
+ parser->implicit_template_parms = 0;
+ parser->implicit_template_scope = 0;
+ }
}
return parameters;
+2014-02-21 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/60052
+ PR c++/60053
+ * g++.dg/cpp1y/pr60052.C: New testcase.
+ * g++.dg/cpp1y/pr60053.C: New testcase.
+
2014-02-21 Tobias Burnus <burnus@net-b.de>
PR fortran/60286
--- /dev/null
+// PR c++/60053
+// { dg-do compile }
+// { dg-options "-std=c++1y" }
+
+struct A
+{
+ void foo(auto);
+};
+
+void A::foo(auto) {}
+
+template<typename> struct B
+{
+ template<typename T> void bar(auto);
+};