summaryrefslogtreecommitdiff
path: root/gcc/convert.c
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-25 19:15:50 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-25 19:15:50 +0000
commitb55f949399e4690c02d584abd27698b3e953b0bb (patch)
treeaf2779b1ec5669ccd9b5104179ae4f53c95149ee /gcc/convert.c
parent1ae4d088bb5934d2e3da58e000c6255d414ac7a0 (diff)
downloadgcc-b55f949399e4690c02d584abd27698b3e953b0bb.tar.gz
* convert.c (convert_to_real, convert_to_integer,
convert_to_complex): Replace calls to build with calls to buildN. * coverage.c (tree_coverage_counter_ref): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (loc_descriptor_from_tree): Likewise. * emit-rtl.c (component_ref_for_mem_expr, set_mem_attributes_minus_bitpos): Likewise. * explow.c (update_nonlocal_goto_save_area): Likewise. * expmed.c (expand_shift, make_tree, const_mult_add_overflow_p, expand_mult_add): Likewise. * expr.c (emit_block_move_via_libcall, clear_storage_via_libcall, store_constructor, get_inner_reference, expand_expr_real_1, try_casesi, try_tablejump): Likewise. * function.c (expand_function_start): Likewise. * stmt.c (emit_case_bit_tests, expand_end_case_type, node_has_low_bound, node_has_high_bound, emit_case_nodes): Likewise. * stor-layout.c (place_union_field, layout_type): Likewise. * tree.c (substitute_in_expr, tree_fold_gcd): Likewise. * varasm.c (copy_constant): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85160 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index 9e89163e1b1..6ff1a541131 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -268,9 +268,9 @@ convert_to_real (tree type, tree expr)
newtype = TREE_TYPE (arg1);
if (TYPE_PRECISION (newtype) < TYPE_PRECISION (itype))
{
- expr = build (TREE_CODE (expr), newtype,
- fold (convert_to_real (newtype, arg0)),
- fold (convert_to_real (newtype, arg1)));
+ expr = build2 (TREE_CODE (expr), newtype,
+ fold (convert_to_real (newtype, arg0)),
+ fold (convert_to_real (newtype, arg1)));
if (newtype == type)
return expr;
}
@@ -525,7 +525,7 @@ convert_to_integer (tree type, tree expr)
/* If the original expression had side-effects, we must
preserve it. */
if (TREE_SIDE_EFFECTS (expr))
- return build (COMPOUND_EXPR, type, expr, t);
+ return build2 (COMPOUND_EXPR, type, expr, t);
else
return t;
}
@@ -605,9 +605,9 @@ convert_to_integer (tree type, tree expr)
else
typex = lang_hooks.types.signed_type (typex);
return convert (type,
- fold (build (ex_form, typex,
- convert (typex, arg0),
- convert (typex, arg1))));
+ fold (build2 (ex_form, typex,
+ convert (typex, arg0),
+ convert (typex, arg1))));
}
}
}
@@ -658,9 +658,9 @@ convert_to_integer (tree type, tree expr)
case COND_EXPR:
/* It is sometimes worthwhile to push the narrowing down through
the conditional and never loses. */
- return fold (build (COND_EXPR, type, TREE_OPERAND (expr, 0),
- convert (type, TREE_OPERAND (expr, 1)),
- convert (type, TREE_OPERAND (expr, 2))));
+ return fold (build3 (COND_EXPR, type, TREE_OPERAND (expr, 0),
+ convert (type, TREE_OPERAND (expr, 1)),
+ convert (type, TREE_OPERAND (expr, 2))));
default:
break;
@@ -704,8 +704,8 @@ convert_to_complex (tree type, tree expr)
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
case CHAR_TYPE:
- return build (COMPLEX_EXPR, type, convert (subtype, expr),
- convert (subtype, integer_zero_node));
+ return build2 (COMPLEX_EXPR, type, convert (subtype, expr),
+ convert (subtype, integer_zero_node));
case COMPLEX_TYPE:
{
@@ -714,23 +714,22 @@ convert_to_complex (tree type, tree expr)
if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype))
return expr;
else if (TREE_CODE (expr) == COMPLEX_EXPR)
- return fold (build (COMPLEX_EXPR,
- type,
- convert (subtype, TREE_OPERAND (expr, 0)),
- convert (subtype, TREE_OPERAND (expr, 1))));
+ return fold (build2 (COMPLEX_EXPR, type,
+ convert (subtype, TREE_OPERAND (expr, 0)),
+ convert (subtype, TREE_OPERAND (expr, 1))));
else
{
expr = save_expr (expr);
return
- fold (build (COMPLEX_EXPR,
- type, convert (subtype,
- fold (build1 (REALPART_EXPR,
- TREE_TYPE (TREE_TYPE (expr)),
- expr))),
- convert (subtype,
- fold (build1 (IMAGPART_EXPR,
- TREE_TYPE (TREE_TYPE (expr)),
- expr)))));
+ fold (build2 (COMPLEX_EXPR, type,
+ convert (subtype,
+ fold (build1 (REALPART_EXPR,
+ TREE_TYPE (TREE_TYPE (expr)),
+ expr))),
+ convert (subtype,
+ fold (build1 (IMAGPART_EXPR,
+ TREE_TYPE (TREE_TYPE (expr)),
+ expr)))));
}
}