aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/utils2.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-04-04 22:19:58 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-04-04 22:19:58 +0000
commit78ef5b895f933cc8a82486aec27d6e7ac7a5acae (patch)
tree50dc6fe5e989dd9c497bfef9c4a8a5e5f0a8ba33 /gcc/ada/utils2.c
parent3900216066f8f2b9a8362daf4da8b225018e69d7 (diff)
downloadgcc-78ef5b895f933cc8a82486aec27d6e7ac7a5acae.zip
gcc-78ef5b895f933cc8a82486aec27d6e7ac7a5acae.tar.gz
gcc-78ef5b895f933cc8a82486aec27d6e7ac7a5acae.tar.bz2
c-common.c (truthvalue_conversion): Rename, update.
* c-common.c (truthvalue_conversion): Rename, update. * c-common.h (c_common_truthvalue_conversion): New. * c-convert.c (convert): Update. * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * c-parse.in (expr_no_commas, if_prefix, select_or_iter_stmt): Update. * c-typeck.c (build_binary_op, build_unary_op, build_conditional_expr): Update. * fold-const.c (constant_boolean_node, fold): Use langhook. * langhooks-def.h (LANGHOOK_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. * stmt.c (expand_decl_cleanup): Use langhook. * tree.h (truthvalue_conversion): Remove. ada: * gigi.h (truthvalue_conversion): Rename. * misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * trans.c (tree_transform): Update. * utils2.c (truthvalue_conversion): Rename, update. (build_binary_op, build_unary_op): Update. cp: * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * cvt.c: Update comment. * init.c (expand_cleanup_for_base): Update. * semantics.c (finish_parenthesized_expr): Update. * typeck.c (cp_truthvalue_conversion): Update. f: * com.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. (truthvalue_conversion): Rename. Update. Make static. (ffecom_truth_value): Update. java: * expr.c (truthvalue_conversion): Rename. Update. (expand_compare): Update. * java-tree.h (java_truthvalue_conversion): New. * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. objc: * objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. From-SVN: r51880
Diffstat (limited to 'gcc/ada/utils2.c')
-rw-r--r--gcc/ada/utils2.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c
index 0e8ada4..6d76a41 100644
--- a/gcc/ada/utils2.c
+++ b/gcc/ada/utils2.c
@@ -66,7 +66,7 @@ static tree build_simple_component_ref PARAMS ((tree, tree, tree));
the only possible operands will be things of Boolean type. */
tree
-truthvalue_conversion (expr)
+gnat_truthvalue_conversion (expr)
tree expr;
{
tree type = TREE_TYPE (expr);
@@ -85,13 +85,14 @@ truthvalue_conversion (expr)
case COND_EXPR:
/* Distribute the conversion into the arms of a COND_EXPR. */
- return fold (build (COND_EXPR, type, TREE_OPERAND (expr, 0),
- truthvalue_conversion (TREE_OPERAND (expr, 1)),
- truthvalue_conversion (TREE_OPERAND (expr, 2))));
+ return fold
+ (build (COND_EXPR, type, TREE_OPERAND (expr, 0),
+ gnat_truthvalue_conversion (TREE_OPERAND (expr, 1)),
+ gnat_truthvalue_conversion (TREE_OPERAND (expr, 2))));
case WITH_RECORD_EXPR:
return build (WITH_RECORD_EXPR, type,
- truthvalue_conversion (TREE_OPERAND (expr, 0)),
+ gnat_truthvalue_conversion (TREE_OPERAND (expr, 0)),
TREE_OPERAND (expr, 1));
default:
@@ -983,8 +984,8 @@ build_binary_op (op_code, result_type, left_operand, right_operand)
case TRUTH_AND_EXPR:
case TRUTH_OR_EXPR:
case TRUTH_XOR_EXPR:
- left_operand = truthvalue_conversion (left_operand);
- right_operand = truthvalue_conversion (right_operand);
+ left_operand = gnat_truthvalue_conversion (left_operand);
+ right_operand = gnat_truthvalue_conversion (right_operand);
goto common;
case BIT_AND_EXPR:
@@ -1115,7 +1116,7 @@ build_unary_op (op_code, result_type, operand)
if (result_type != base_type)
gigi_abort (508);
- result = invert_truthvalue (truthvalue_conversion (operand));
+ result = invert_truthvalue (gnat_truthvalue_conversion (operand));
break;
case ATTR_ADDR_EXPR: