diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-07-26 18:12:16 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-07-26 18:12:16 +0000 |
commit | 4143af330f1079ad839fdf495c9b7bc34ac3e849 (patch) | |
tree | 73f88ab8a11ff16dd144b5342ed7b5c1fe187b10 /gcc | |
parent | 8bc6495183d4589a68cae00c343b7f1477baf624 (diff) | |
download | gcc-4143af330f1079ad839fdf495c9b7bc34ac3e849.zip gcc-4143af330f1079ad839fdf495c9b7bc34ac3e849.tar.gz gcc-4143af330f1079ad839fdf495c9b7bc34ac3e849.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/call.c | 16 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 2 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 2 |
4 files changed, 19 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index aac5417..3e836d8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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> * exception.cc (__cplus_type_matcher): Match __eh_matcher diff --git a/gcc/cp/call.c b/gcc/cp/call.c index cd5e77d..1d9e837 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 4e13392..3852721 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 c4bb18f..506fa9c 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. |