OSDN Git Service

* class.c (type_has_user_provided_default_constructor): Handle
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Jul 2008 15:18:16 +0000 (15:18 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Jul 2008 15:18:16 +0000 (15:18 +0000)
        templates.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138142 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/class.c

index b63655e..d918e68 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-25  Jason Merrill  <jason@redhat.com>
+
+       * class.c (type_has_user_provided_default_constructor): Handle
+       templates.
+
 2008-07-23  Jan Hubicka  <jh@suse.cz>
 
        * cp/decl.c (duplicate_decls): Update comment and unit-at-a-time.
@@ -7,6 +12,9 @@
 
 2008-07-23  Jason Merrill  <jason@redhat.com>
 
+       * mangle.c (write_unqualified_name): Avoid infinite recursion when
+       trying to mangle a decl with no name.
+
        Implement defaulted/deleted functions as per N2346
        * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
        (DECL_DELETED_FN): New macro.
index 0649eec..1820460 100644 (file)
@@ -4115,7 +4115,8 @@ type_has_user_provided_default_constructor (tree t)
   for (fns = CLASSTYPE_CONSTRUCTORS (t); fns; fns = OVL_NEXT (fns))
     {
       tree fn = OVL_CURRENT (fns);
-      if (user_provided_p (fn)
+      if (TREE_CODE (fn) == FUNCTION_DECL
+         && user_provided_p (fn)
          && (skip_artificial_parms_for (fn, DECL_ARGUMENTS (fn))
              == NULL_TREE))
        return true;