PR c++/77638
* parser.c (cp_parser_template_declaration_after_parameter): For 2
argument operator"" template set ok to false for
parm == error_mark_node.
* g++.dg/cpp0x/udlit-tmpl-arg-neg2.C: New test.
From-SVN: r240266
2016-09-20 Jakub Jelinek <jakub@redhat.com>
+ PR c++/77638
+ * parser.c (cp_parser_template_declaration_after_parameter): For 2
+ argument operator"" template set ok to false for
+ parm == error_mark_node.
+
PR c++/77637
* parser.c (cp_parser_std_attribute_list): Reject ... without
preceding attribute.
tree type = INNERMOST_TEMPLATE_PARMS (parm_type);
tree parm_list = TREE_VEC_ELT (parameter_list, 1);
tree parm = INNERMOST_TEMPLATE_PARMS (parm_list);
- if (TREE_TYPE (parm) != TREE_TYPE (type)
+ if (parm == error_mark_node
+ || TREE_TYPE (parm) != TREE_TYPE (type)
|| !TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (parm)))
ok = false;
}
2016-09-20 Jakub Jelinek <jakub@redhat.com>
+ PR c++/77638
+ * g++.dg/cpp0x/udlit-tmpl-arg-neg2.C: New test.
+
PR c++/77637
* g++.dg/cpp0x/gen-attrs-62.C: New test.
--- /dev/null
+// PR c++/77638
+// { dg-do compile { target c++11 } }
+
+template <T, T... U> // { dg-error "'T' has not been declared" }
+int operator"" _foo (); // { dg-error "has invalid parameter list" }
+template <T... U> // { dg-error "'T' has not been declared" }
+int operator"" _bar (); // { dg-error "has invalid parameter list" }