+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
/* 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]
{
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)
return champ;
}
+/* Returns non-zero if things of type FROM can be converted to TO. */
+
int
can_convert (to, from)
tree 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;
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;
{
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));