From a0eca0c270319e3e299fd466fba02aab53fab4f9 Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 15 Jun 2010 19:58:45 +0000 Subject: [PATCH] * class.c (type_has_user_provided_default_constructor): Use sufficient_parms_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160805 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/class.c | 13 ++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7fc5210..07d565d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2010-06-15 Jason Merrill + * class.c (type_has_user_provided_default_constructor): Use + sufficient_parms_p. + * call.c (is_subseq): Handle ck_aggr, ck_list. (compare_ics): Treat an aggregate or ambiguous conversion to the same type as involving the same function. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 14224aa..340fe87 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4247,7 +4247,7 @@ type_has_user_provided_constructor (tree t) bool type_has_user_provided_default_constructor (tree t) { - tree fns, args; + tree fns; if (!TYPE_HAS_USER_CONSTRUCTOR (t)) return false; @@ -4256,14 +4256,9 @@ type_has_user_provided_default_constructor (tree t) { tree fn = OVL_CURRENT (fns); if (TREE_CODE (fn) == FUNCTION_DECL - && user_provided_p (fn)) - { - args = FUNCTION_FIRST_USER_PARMTYPE (fn); - while (args && TREE_PURPOSE (args)) - args = TREE_CHAIN (args); - if (!args || args == void_list_node) - return true; - } + && user_provided_p (fn) + && sufficient_parms_p (FUNCTION_FIRST_USER_PARMTYPE (fn))) + return true; } return false; -- 2.7.4