PR c++/35734
* class.c (type_has_user_nondefault_constructor): A template
counts as a nondefault constructor.
From-SVN: r133987
+2008-04-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/35734
+ * class.c (type_has_user_nondefault_constructor): A template
+ counts as a nondefault constructor.
+
2008-04-04 Paolo Bonzini <bonzini@gnu.org>
* decl.c (cxx_push_function_context): Delete.
{
tree fn = OVL_CURRENT (fns);
if (!DECL_ARTIFICIAL (fn)
- && skip_artificial_parms_for (fn, DECL_ARGUMENTS (fn)) != NULL_TREE)
+ && (TREE_CODE (fn) == TEMPLATE_DECL
+ || (skip_artificial_parms_for (fn, DECL_ARGUMENTS (fn))
+ != NULL_TREE)))
return true;
}
+2008-04-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/35734
+ * g++.dg/warn/ctor1.C: New.
+
2008-04-07 Kai Tietz <kai.tietz@onevision.com>
PR/35842
--- /dev/null
+// PR c++/35734
+// { dg-options "-W" }
+
+struct A
+{
+ A();
+ template<typename T> A(const T&);
+};
+
+struct B : A
+{
+ B(const B&) {} // { dg-warning "base class" }
+};