From 4143af330f1079ad839fdf495c9b7bc34ac3e849 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Mon, 26 Jul 1999 18:12:16 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/call.c | 16 +++++++++++----- gcc/cp/cp-tree.h | 2 +- gcc/cp/typeck.c | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index aac5417740a..3e836d84ec8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +1999-07-26 Mark Mitchell + + * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion. + * call.c: All uses changed. + * typeck.c: Likewise. + 1999-07-26 Nathan Sidwell * exception.cc (__cplus_type_matcher): Match __eh_matcher diff --git a/gcc/cp/call.c b/gcc/cp/call.c index cd5e77d6a2c..1d9e83745d4 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -2977,8 +2977,8 @@ build_conditional_expr (arg1, arg2, arg3) /* In this case, there is always a common type. */ result_type = type_after_usual_arithmetic_conversions (arg2_type, arg3_type); - arg2 = ncp_convert (result_type, arg2); - arg3 = ncp_convert (result_type, arg3); + arg2 = perform_implicit_conversion (result_type, arg2); + arg3 = perform_implicit_conversion (result_type, arg3); } /* [expr.cond] @@ -3009,8 +3009,8 @@ build_conditional_expr (arg1, arg2, arg3) { result_type = composite_pointer_type (arg2_type, arg3_type, arg2, arg3, "conditional expression"); - arg2 = ncp_convert (result_type, arg2); - arg3 = ncp_convert (result_type, arg3); + arg2 = perform_implicit_conversion (result_type, arg2); + arg3 = perform_implicit_conversion (result_type, arg3); } if (!result_type) @@ -5060,6 +5060,8 @@ tourney (candidates) return champ; } +/* Returns non-zero if things of type FROM can be converted to TO. */ + int can_convert (to, from) tree to, from; @@ -5067,6 +5069,8 @@ can_convert (to, from) return can_convert_arg (to, from, NULL_TREE); } +/* Returns non-zero if ARG (of type FROM) can be converted to TO. */ + int can_convert_arg (to, from, arg) tree to, from, arg; @@ -5075,8 +5079,10 @@ can_convert_arg (to, from, arg) return (t && ! ICS_BAD_FLAG (t)); } +/* Convert EXPR to TYPE. Return the converted expression. */ + tree -ncp_convert (type, expr) +perform_implicit_conversion (type, expr) tree type; tree expr; { diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 4e13392a98a..3852721ed46 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2785,7 +2785,7 @@ extern tree convert_arg_to_ellipsis PROTO((tree)); extern int is_properly_derived_from PROTO((tree, tree)); extern tree initialize_reference PROTO((tree, 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 */ extern tree build_vbase_path PROTO((enum tree_code, tree, tree, tree, int)); diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index c4bb18f801f..506fa9c1217 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -6526,7 +6526,7 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum) errtype); 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. -- 2.30.2