PR c++/22233
* pt.c (push_template_decl_real): Return error_mark_node if the
number of template parameters does not match previous definition.
* g++.dg/template/param1.C: New test.
From-SVN: r103339
+2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/22233
+ * pt.c (push_template_decl_real): Return error_mark_node if the
+ number of template parameters does not match previous definition.
+
2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/23089
error ("got %d template parameters for %q#T",
TREE_VEC_LENGTH (a), current);
error (" but %d required", TREE_VEC_LENGTH (t));
+ return error_mark_node;
}
/* Perhaps we should also check that the parms are used in the
+2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/22233
+ * g++.dg/template/param1.C: New test.
+
2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/23089
--- /dev/null
+// PR c++/22233
+// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+// { dg-do compile }
+
+template<int> struct A
+{
+ A();
+};
+
+template<int N, char> A<N>::A() {} // { dg-error "got 2|but 1 required" }
+
+A<0> a;