summaryrefslogtreecommitdiffstats
path: root/gcc/ada/utils2.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-04 22:19:58 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-04 22:19:58 +0000
commitaff9e6561ee30f3802fe5993a64cdcd7a53146b4 (patch)
tree50dc6fe5e989dd9c497bfef9c4a8a5e5f0a8ba33 /gcc/ada/utils2.c
parent322fc845e136fcb38a416b552b3e8367388b93a8 (diff)
downloadppe42-gcc-aff9e6561ee30f3802fe5993a64cdcd7a53146b4.tar.gz
ppe42-gcc-aff9e6561ee30f3802fe5993a64cdcd7a53146b4.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51880 138bc75d-0d04-0410-961f-82ee72b054a4
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 0e8ada4041a..6d76a4149ce 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:
OpenPOWER on IntegriCloud