+2008-11-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/28743
+ * decl2.c (check_classfn): Error rather than abort on parameter
+ list mismatch.
+
2008-11-20 Jason Merrill <jason@redhat.com>
PR c++/28513
either were not passed, or they are the same of DECL_TEMPLATE_PARMS. */
if (TREE_CODE (function) == TEMPLATE_DECL)
{
- gcc_assert (!template_parms
- || comp_template_parms (template_parms,
- DECL_TEMPLATE_PARMS (function)));
+ if (template_parms
+ && !comp_template_parms (template_parms,
+ DECL_TEMPLATE_PARMS (function)))
+ {
+ error ("template parameter lists provided don't match the "
+ "template parameters of %qD", function);
+ return error_mark_node;
+ }
template_parms = DECL_TEMPLATE_PARMS (function);
}
+2008-11-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/28743
+ * g++.dg/template/nontype18.C: New test.
+
2008-11-25 Maxim Kuvyrkov <maxim@codesourcery.com>
* gcc.c-torture/compile/20080929-1.c: New.
--- /dev/null
+// PR c++/28743
+
+template<int I> struct A
+{
+ template<typename T> void foo();
+};
+
+template<int I> template<typename T> void A<0>::foo() {} // { dg-error "template parameter" }