From: Jason Merrill Date: Fri, 25 Jul 2008 15:18:16 +0000 (-0400) Subject: class.c (type_has_user_provided_default_constructor): Handle templates. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ad8d488b18793242007402e7aaa7ea95ca28ca6;p=gcc.git class.c (type_has_user_provided_default_constructor): Handle templates. * class.c (type_has_user_provided_default_constructor): Handle templates. From-SVN: r138142 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b63655e91ac..d918e6803ae 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2008-07-25 Jason Merrill + + * class.c (type_has_user_provided_default_constructor): Handle + templates. + 2008-07-23 Jan Hubicka * cp/decl.c (duplicate_decls): Update comment and unit-at-a-time. @@ -7,6 +12,9 @@ 2008-07-23 Jason Merrill + * 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. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 0649eec2486..18204608da3 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -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;