Commit 71b8cb01 by Jason Merrill Committed by Jason Merrill

class.c (type_has_user_provided_default_constructor): Use sufficient_parms_p.

	* class.c (type_has_user_provided_default_constructor): Use
	sufficient_parms_p.

From-SVN: r160805
parent 756bcf03
2010-06-15 Jason Merrill <jason@redhat.com> 2010-06-15 Jason Merrill <jason@redhat.com>
* class.c (type_has_user_provided_default_constructor): Use
sufficient_parms_p.
* call.c (is_subseq): Handle ck_aggr, ck_list. * call.c (is_subseq): Handle ck_aggr, ck_list.
(compare_ics): Treat an aggregate or ambiguous conversion to the (compare_ics): Treat an aggregate or ambiguous conversion to the
same type as involving the same function. same type as involving the same function.
......
...@@ -4247,7 +4247,7 @@ type_has_user_provided_constructor (tree t) ...@@ -4247,7 +4247,7 @@ type_has_user_provided_constructor (tree t)
bool bool
type_has_user_provided_default_constructor (tree t) type_has_user_provided_default_constructor (tree t)
{ {
tree fns, args; tree fns;
if (!TYPE_HAS_USER_CONSTRUCTOR (t)) if (!TYPE_HAS_USER_CONSTRUCTOR (t))
return false; return false;
...@@ -4256,14 +4256,9 @@ type_has_user_provided_default_constructor (tree t) ...@@ -4256,14 +4256,9 @@ type_has_user_provided_default_constructor (tree t)
{ {
tree fn = OVL_CURRENT (fns); tree fn = OVL_CURRENT (fns);
if (TREE_CODE (fn) == FUNCTION_DECL if (TREE_CODE (fn) == FUNCTION_DECL
&& user_provided_p (fn)) && user_provided_p (fn)
{ && sufficient_parms_p (FUNCTION_FIRST_USER_PARMTYPE (fn)))
args = FUNCTION_FIRST_USER_PARMTYPE (fn); return true;
while (args && TREE_PURPOSE (args))
args = TREE_CHAIN (args);
if (!args || args == void_list_node)
return true;
}
} }
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment