class.c (type_has_user_provided_default_constructor): Handle templates.
authorJason Merrill <jason@redhat.com>
Fri, 25 Jul 2008 15:18:16 +0000 (11:18 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 25 Jul 2008 15:18:16 +0000 (11:18 -0400)
        * class.c (type_has_user_provided_default_constructor): Handle
        templates.

From-SVN: r138142

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

index b63655e91acb5d5126fd3d97cc1e9937b05a4c1e..d918e6803ae44a94766b2d6735c5c22cae43a7ff 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 0649eec2486a7054031a2766616232866d19e3a1..18204608da36b0dd3fafd559702119ec811f1bb5 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;