Commit 4143af33 by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.

	* cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
	* call.c: All uses changed.
	* typeck.c: Likewise.

From-SVN: r28272
parent 8bc64951
1999-07-26 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
* call.c: All uses changed.
* typeck.c: Likewise.
1999-07-26 Nathan Sidwell <nathan@acm.org> 1999-07-26 Nathan Sidwell <nathan@acm.org>
* exception.cc (__cplus_type_matcher): Match __eh_matcher * exception.cc (__cplus_type_matcher): Match __eh_matcher
......
...@@ -2977,8 +2977,8 @@ build_conditional_expr (arg1, arg2, arg3) ...@@ -2977,8 +2977,8 @@ build_conditional_expr (arg1, arg2, arg3)
/* In this case, there is always a common type. */ /* In this case, there is always a common type. */
result_type = type_after_usual_arithmetic_conversions (arg2_type, result_type = type_after_usual_arithmetic_conversions (arg2_type,
arg3_type); arg3_type);
arg2 = ncp_convert (result_type, arg2); arg2 = perform_implicit_conversion (result_type, arg2);
arg3 = ncp_convert (result_type, arg3); arg3 = perform_implicit_conversion (result_type, arg3);
} }
/* [expr.cond] /* [expr.cond]
...@@ -3009,8 +3009,8 @@ build_conditional_expr (arg1, arg2, arg3) ...@@ -3009,8 +3009,8 @@ build_conditional_expr (arg1, arg2, arg3)
{ {
result_type = composite_pointer_type (arg2_type, arg3_type, arg2, result_type = composite_pointer_type (arg2_type, arg3_type, arg2,
arg3, "conditional expression"); arg3, "conditional expression");
arg2 = ncp_convert (result_type, arg2); arg2 = perform_implicit_conversion (result_type, arg2);
arg3 = ncp_convert (result_type, arg3); arg3 = perform_implicit_conversion (result_type, arg3);
} }
if (!result_type) if (!result_type)
...@@ -5060,6 +5060,8 @@ tourney (candidates) ...@@ -5060,6 +5060,8 @@ tourney (candidates)
return champ; return champ;
} }
/* Returns non-zero if things of type FROM can be converted to TO. */
int int
can_convert (to, from) can_convert (to, from)
tree to, from; tree to, from;
...@@ -5067,6 +5069,8 @@ can_convert (to, from) ...@@ -5067,6 +5069,8 @@ can_convert (to, from)
return can_convert_arg (to, from, NULL_TREE); return can_convert_arg (to, from, NULL_TREE);
} }
/* Returns non-zero if ARG (of type FROM) can be converted to TO. */
int int
can_convert_arg (to, from, arg) can_convert_arg (to, from, arg)
tree to, from, arg; tree to, from, arg;
...@@ -5075,8 +5079,10 @@ can_convert_arg (to, from, arg) ...@@ -5075,8 +5079,10 @@ can_convert_arg (to, from, arg)
return (t && ! ICS_BAD_FLAG (t)); return (t && ! ICS_BAD_FLAG (t));
} }
/* Convert EXPR to TYPE. Return the converted expression. */
tree tree
ncp_convert (type, expr) perform_implicit_conversion (type, expr)
tree type; tree type;
tree expr; tree expr;
{ {
......
...@@ -2785,7 +2785,7 @@ extern tree convert_arg_to_ellipsis PROTO((tree)); ...@@ -2785,7 +2785,7 @@ extern tree convert_arg_to_ellipsis PROTO((tree));
extern int is_properly_derived_from PROTO((tree, tree)); extern int is_properly_derived_from PROTO((tree, tree));
extern tree initialize_reference PROTO((tree, tree)); extern tree initialize_reference PROTO((tree, tree));
extern tree strip_top_quals PROTO((tree)); extern tree strip_top_quals PROTO((tree));
extern tree ncp_convert PROTO((tree, tree)); extern tree perform_implicit_conversion PROTO((tree, tree));
/* in class.c */ /* in class.c */
extern tree build_vbase_path PROTO((enum tree_code, tree, tree, tree, int)); extern tree build_vbase_path PROTO((enum tree_code, tree, tree, tree, int));
......
...@@ -6526,7 +6526,7 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum) ...@@ -6526,7 +6526,7 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
errtype); errtype);
return error_mark_node; return error_mark_node;
} }
return ncp_convert (strip_top_quals (type), rhs); return perform_implicit_conversion (strip_top_quals (type), rhs);
} }
/* Convert RHS to be of type TYPE. /* Convert RHS to be of type TYPE.
......
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