* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103339
138bc75d-0d04-0410-961f-
82ee72b054a4
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
* decl.c (require_complete_types_for_parms): Mark incomplete types
as invalid.
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
* g++.dg/other/incomplete1.C: New test.
--- /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;