Check that template using decls have the correct number of parm lists.
for gcc/cp/ChangeLog
PR c++/71251
* parser.c (cp_parser_alias_declaration): Call
parser_check_template_parameters.
for gcc/testsuite/ChangeLog
PR c++/71251
* g++.dg/cpp0x/pr71251.C: New.
From-SVN: r258793
-2018-03-22 Alexandre Oliva <aoliva@redhat.com>
+2018-03-23 Alexandre Oliva <aoliva@redhat.com>
+
+ PR c++/71251
+ * parser.c (cp_parser_alias_declaration): Call
+ parser_check_template_parameters.
PR c++/84789
* pt.c (resolve_typename_type): Drop assert that stopped
ds_alias,
using_token);
+ if (parser->num_template_parameter_lists
+ && !cp_parser_check_template_parameters (parser,
+ /*num_templates=*/0,
+ id_location,
+ /*declarator=*/NULL))
+ return error_mark_node;
+
declarator = make_id_declarator (NULL_TREE, id, sfk_none);
declarator->id_loc = id_location;
-2018-03-22 Alexandre Oliva <aoliva@redhat.com>
+2018-03-23 Alexandre Oliva <aoliva@redhat.com>
+
+ PR c++/71251
+ * g++.dg/cpp0x/pr71251.C: New.
PR c++/84789
* g++.dg/template/pr84789.C: New.
--- /dev/null
+// { dg-do compile { target c++11 } }
+
+template<int,int> template<typename>
+using U = void; // { dg-error "too many" }
+
+template<typename>
+using V = void;
+
+template<typename> struct X {
+ template<typename> template<typename>
+ using U = void; // { dg-error "too many" }
+
+ template<typename>
+ using V = void;
+};