Commit 53fb4de3 by Roger Sayle Committed by Roger Sayle

c-common.c (shorten_compare, [...]): Replace calls to build with calls to buildN.


	* c-common.c (shorten_compare, pointer_int_sum,
	c_common_truthvalue_conversion, boolean_increment): Replace calls
	to build with calls to buildN.
	* c-decl.c (complete_array_type, grokdeclarator): Likewise.
	* c-gimplify.c (c_build_bind_expr, gimplify_c_loop,
	gimplify_switch_stmt): Likewise.
	* c-typeck.c (default_function_array_conversion,
	build_component_ref, build_array_ref, build_function_call,
	pointer_diff, build_unary_op, build_conditional_expr,
	build_compound_expr, build_modify_expr, c_finish_goto_label,
	c_finish_goto_ptr, c_finish_return, c_finish_loop,
	c_finish_bc_stmt, c_finish_stmt_expr, c_end_compound_stmt,
	build_binary_op): Likewise.

From-SVN: r86018
parent b9413dbc
2004-08-14 Roger Sayle <roger@eyesopen.com>
* c-common.c (shorten_compare, pointer_int_sum,
c_common_truthvalue_conversion, boolean_increment): Replace calls
to build with calls to buildN.
* c-decl.c (complete_array_type, grokdeclarator): Likewise.
* c-gimplify.c (c_build_bind_expr, gimplify_c_loop,
gimplify_switch_stmt): Likewise.
* c-typeck.c (default_function_array_conversion,
build_component_ref, build_array_ref, build_function_call,
pointer_diff, build_unary_op, build_conditional_expr,
build_compound_expr, build_modify_expr, c_finish_goto_label,
c_finish_goto_ptr, c_finish_return, c_finish_loop,
c_finish_bc_stmt, c_finish_stmt_expr, c_end_compound_stmt,
build_binary_op): Likewise.
2004-08-15 Steven Bosscher <stevenb@suse.de> 2004-08-15 Steven Bosscher <stevenb@suse.de>
* rtl.c (note_insn_name): Add NOTE_DISABLE_SCHED_OF_BLOCK. * rtl.c (note_insn_name): Add NOTE_DISABLE_SCHED_OF_BLOCK.
......
...@@ -2114,7 +2114,7 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr, ...@@ -2114,7 +2114,7 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
{ {
/* Don't forget to evaluate PRIMOP0 if it has side effects. */ /* Don't forget to evaluate PRIMOP0 if it has side effects. */
if (TREE_SIDE_EFFECTS (primop0)) if (TREE_SIDE_EFFECTS (primop0))
return build (COMPOUND_EXPR, TREE_TYPE (val), primop0, val); return build2 (COMPOUND_EXPR, TREE_TYPE (val), primop0, val);
return val; return val;
} }
...@@ -2198,8 +2198,8 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr, ...@@ -2198,8 +2198,8 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
{ {
/* Don't forget to evaluate PRIMOP0 if it has side effects. */ /* Don't forget to evaluate PRIMOP0 if it has side effects. */
if (TREE_SIDE_EFFECTS (primop0)) if (TREE_SIDE_EFFECTS (primop0))
return build (COMPOUND_EXPR, TREE_TYPE (value), return build2 (COMPOUND_EXPR, TREE_TYPE (value),
primop0, value); primop0, value);
return value; return value;
} }
} }
...@@ -2294,7 +2294,7 @@ pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop) ...@@ -2294,7 +2294,7 @@ pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
convert (TREE_TYPE (intop), size_exp), 1)); convert (TREE_TYPE (intop), size_exp), 1));
/* Create the sum or difference. */ /* Create the sum or difference. */
return fold (build (resultcode, result_type, ptrop, intop)); return fold (build2 (resultcode, result_type, ptrop, intop));
} }
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR, /* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
...@@ -2360,8 +2360,8 @@ c_common_truthvalue_conversion (tree expr) ...@@ -2360,8 +2360,8 @@ c_common_truthvalue_conversion (tree expr)
break; break;
if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 0))) if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 0)))
return build (COMPOUND_EXPR, truthvalue_type_node, return build2 (COMPOUND_EXPR, truthvalue_type_node,
TREE_OPERAND (expr, 0), truthvalue_true_node); TREE_OPERAND (expr, 0), truthvalue_true_node);
else else
return truthvalue_true_node; return truthvalue_true_node;
} }
...@@ -2384,14 +2384,16 @@ c_common_truthvalue_conversion (tree expr) ...@@ -2384,14 +2384,16 @@ c_common_truthvalue_conversion (tree expr)
/* These don't change whether an object is zero or nonzero, but /* These don't change whether an object is zero or nonzero, but
we can't ignore them if their second arg has side-effects. */ we can't ignore them if their second arg has side-effects. */
if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1))) if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1)))
return build (COMPOUND_EXPR, truthvalue_type_node, TREE_OPERAND (expr, 1), return build2 (COMPOUND_EXPR, truthvalue_type_node,
lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0))); TREE_OPERAND (expr, 1),
lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0)));
else else
return lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0)); return lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0));
case COND_EXPR: case COND_EXPR:
/* Distribute the conversion into the arms of a COND_EXPR. */ /* Distribute the conversion into the arms of a COND_EXPR. */
return fold (build (COND_EXPR, truthvalue_type_node, TREE_OPERAND (expr, 0), return fold (build3 (COND_EXPR, truthvalue_type_node,
TREE_OPERAND (expr, 0),
lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 1)), lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 1)),
lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 2)))); lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 2))));
...@@ -3855,22 +3857,24 @@ boolean_increment (enum tree_code code, tree arg) ...@@ -3855,22 +3857,24 @@ boolean_increment (enum tree_code code, tree arg)
switch (code) switch (code)
{ {
case PREINCREMENT_EXPR: case PREINCREMENT_EXPR:
val = build (MODIFY_EXPR, TREE_TYPE (arg), arg, true_res); val = build2 (MODIFY_EXPR, TREE_TYPE (arg), arg, true_res);
break; break;
case POSTINCREMENT_EXPR: case POSTINCREMENT_EXPR:
val = build (MODIFY_EXPR, TREE_TYPE (arg), arg, true_res); val = build2 (MODIFY_EXPR, TREE_TYPE (arg), arg, true_res);
arg = save_expr (arg); arg = save_expr (arg);
val = build (COMPOUND_EXPR, TREE_TYPE (arg), val, arg); val = build2 (COMPOUND_EXPR, TREE_TYPE (arg), val, arg);
val = build (COMPOUND_EXPR, TREE_TYPE (arg), arg, val); val = build2 (COMPOUND_EXPR, TREE_TYPE (arg), arg, val);
break; break;
case PREDECREMENT_EXPR: case PREDECREMENT_EXPR:
val = build (MODIFY_EXPR, TREE_TYPE (arg), arg, invert_truthvalue (arg)); val = build2 (MODIFY_EXPR, TREE_TYPE (arg), arg,
invert_truthvalue (arg));
break; break;
case POSTDECREMENT_EXPR: case POSTDECREMENT_EXPR:
val = build (MODIFY_EXPR, TREE_TYPE (arg), arg, invert_truthvalue (arg)); val = build2 (MODIFY_EXPR, TREE_TYPE (arg), arg,
invert_truthvalue (arg));
arg = save_expr (arg); arg = save_expr (arg);
val = build (COMPOUND_EXPR, TREE_TYPE (arg), val, arg); val = build2 (COMPOUND_EXPR, TREE_TYPE (arg), val, arg);
val = build (COMPOUND_EXPR, TREE_TYPE (arg), arg, val); val = build2 (COMPOUND_EXPR, TREE_TYPE (arg), arg, val);
break; break;
default: default:
abort (); abort ();
......
...@@ -3072,7 +3072,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree) ...@@ -3072,7 +3072,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
&& STATEMENT_LIST_HAS_LABEL (cur_stmt_list)) && STATEMENT_LIST_HAS_LABEL (cur_stmt_list))
{ {
tree bind; tree bind;
bind = build (BIND_EXPR, void_type_node, NULL, NULL, NULL); bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL);
TREE_SIDE_EFFECTS (bind) = 1; TREE_SIDE_EFFECTS (bind) = 1;
add_stmt (bind); add_stmt (bind);
BIND_EXPR_BODY (bind) = push_stmt_list (); BIND_EXPR_BODY (bind) = push_stmt_list ();
...@@ -3281,8 +3281,8 @@ complete_array_type (tree type, tree initial_value, int do_default) ...@@ -3281,8 +3281,8 @@ complete_array_type (tree type, tree initial_value, int do_default)
if (TREE_PURPOSE (elts)) if (TREE_PURPOSE (elts))
maxindex = TREE_PURPOSE (elts); maxindex = TREE_PURPOSE (elts);
else else
maxindex = fold (build (PLUS_EXPR, integer_type_node, maxindex = fold (build2 (PLUS_EXPR, integer_type_node,
maxindex, integer_one_node)); maxindex, integer_one_node));
} }
} }
else else
...@@ -4103,9 +4103,9 @@ grokdeclarator (tree declarator, tree declspecs, ...@@ -4103,9 +4103,9 @@ grokdeclarator (tree declarator, tree declspecs,
Do the calculation in index_type, so that if it is Do the calculation in index_type, so that if it is
a variable the computations will be done in the a variable the computations will be done in the
proper mode. */ proper mode. */
itype = fold (build (MINUS_EXPR, index_type, itype = fold (build2 (MINUS_EXPR, index_type,
convert (index_type, size), convert (index_type, size),
convert (index_type, size_one_node))); convert (index_type, size_one_node)));
/* If that overflowed, the array is too big. /* If that overflowed, the array is too big.
??? While a size of INT_MAX+1 technically shouldn't ??? While a size of INT_MAX+1 technically shouldn't
......
...@@ -196,7 +196,7 @@ c_build_bind_expr (tree block, tree body) ...@@ -196,7 +196,7 @@ c_build_bind_expr (tree block, tree body)
body = build_empty_stmt (); body = build_empty_stmt ();
if (decls || block) if (decls || block)
{ {
bind = build (BIND_EXPR, void_type_node, decls, body, block); bind = build3 (BIND_EXPR, void_type_node, decls, body, block);
TREE_SIDE_EFFECTS (bind) = 1; TREE_SIDE_EFFECTS (bind) = 1;
} }
else else
...@@ -365,7 +365,7 @@ gimplify_c_loop (tree cond, tree body, tree incr, bool cond_is_first) ...@@ -365,7 +365,7 @@ gimplify_c_loop (tree cond, tree body, tree incr, bool cond_is_first)
if (cond) if (cond)
{ {
t = build_bc_goto (bc_break); t = build_bc_goto (bc_break);
exit = build (COND_EXPR, void_type_node, cond, exit, t); exit = build3 (COND_EXPR, void_type_node, cond, exit, t);
exit = fold (exit); exit = fold (exit);
gimplify_stmt (&exit); gimplify_stmt (&exit);
} }
...@@ -456,8 +456,8 @@ gimplify_switch_stmt (tree *stmt_p) ...@@ -456,8 +456,8 @@ gimplify_switch_stmt (tree *stmt_p)
if (!body) if (!body)
body = build_empty_stmt (); body = build_empty_stmt ();
*stmt_p = build (SWITCH_EXPR, SWITCH_TYPE (stmt), SWITCH_COND (stmt), *stmt_p = build3 (SWITCH_EXPR, SWITCH_TYPE (stmt), SWITCH_COND (stmt),
body, NULL_TREE); body, NULL_TREE);
SET_EXPR_LOCATION (*stmt_p, stmt_locus); SET_EXPR_LOCATION (*stmt_p, stmt_locus);
gimplify_stmt (stmt_p); gimplify_stmt (stmt_p);
......
...@@ -1217,8 +1217,8 @@ default_function_array_conversion (tree exp) ...@@ -1217,8 +1217,8 @@ default_function_array_conversion (tree exp)
if (TREE_CODE (exp) == COMPOUND_EXPR) if (TREE_CODE (exp) == COMPOUND_EXPR)
{ {
tree op1 = default_conversion (TREE_OPERAND (exp, 1)); tree op1 = default_conversion (TREE_OPERAND (exp, 1));
return build (COMPOUND_EXPR, TREE_TYPE (op1), return build2 (COMPOUND_EXPR, TREE_TYPE (op1),
TREE_OPERAND (exp, 0), op1); TREE_OPERAND (exp, 0), op1);
} }
lvalue_array_p = !not_lvalue && lvalue_p (exp); lvalue_array_p = !not_lvalue && lvalue_p (exp);
...@@ -1456,8 +1456,8 @@ build_component_ref (tree datum, tree component) ...@@ -1456,8 +1456,8 @@ build_component_ref (tree datum, tree component)
case COMPOUND_EXPR: case COMPOUND_EXPR:
{ {
tree value = build_component_ref (TREE_OPERAND (datum, 1), component); tree value = build_component_ref (TREE_OPERAND (datum, 1), component);
return build (COMPOUND_EXPR, TREE_TYPE (value), return build2 (COMPOUND_EXPR, TREE_TYPE (value),
TREE_OPERAND (datum, 0), non_lvalue (value)); TREE_OPERAND (datum, 0), non_lvalue (value));
} }
default: default:
break; break;
...@@ -1495,8 +1495,8 @@ build_component_ref (tree datum, tree component) ...@@ -1495,8 +1495,8 @@ build_component_ref (tree datum, tree component)
if (TREE_TYPE (subdatum) == error_mark_node) if (TREE_TYPE (subdatum) == error_mark_node)
return error_mark_node; return error_mark_node;
ref = build (COMPONENT_REF, TREE_TYPE (subdatum), datum, subdatum, ref = build3 (COMPONENT_REF, TREE_TYPE (subdatum), datum, subdatum,
NULL_TREE); NULL_TREE);
if (TREE_READONLY (datum) || TREE_READONLY (subdatum)) if (TREE_READONLY (datum) || TREE_READONLY (subdatum))
TREE_READONLY (ref) = 1; TREE_READONLY (ref) = 1;
if (TREE_THIS_VOLATILE (datum) || TREE_THIS_VOLATILE (subdatum)) if (TREE_THIS_VOLATILE (datum) || TREE_THIS_VOLATILE (subdatum))
...@@ -1649,7 +1649,7 @@ build_array_ref (tree array, tree index) ...@@ -1649,7 +1649,7 @@ build_array_ref (tree array, tree index)
} }
type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (array))); type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (array)));
rval = build (ARRAY_REF, type, array, index, NULL_TREE, NULL_TREE); rval = build4 (ARRAY_REF, type, array, index, NULL_TREE, NULL_TREE);
/* Array ref is const/volatile if the array elements are /* Array ref is const/volatile if the array elements are
or if the array is. */ or if the array is. */
TREE_READONLY (rval) TREE_READONLY (rval)
...@@ -1869,7 +1869,7 @@ build_function_call (tree function, tree params) ...@@ -1869,7 +1869,7 @@ build_function_call (tree function, tree params)
else else
rhs = fold (build1 (NOP_EXPR, return_type, integer_zero_node)); rhs = fold (build1 (NOP_EXPR, return_type, integer_zero_node));
return build (COMPOUND_EXPR, return_type, trap, rhs); return build2 (COMPOUND_EXPR, return_type, trap, rhs);
} }
} }
...@@ -1883,8 +1883,8 @@ build_function_call (tree function, tree params) ...@@ -1883,8 +1883,8 @@ build_function_call (tree function, tree params)
check_function_arguments (TYPE_ATTRIBUTES (fntype), coerced_params); check_function_arguments (TYPE_ATTRIBUTES (fntype), coerced_params);
result = build (CALL_EXPR, TREE_TYPE (fntype), result = build3 (CALL_EXPR, TREE_TYPE (fntype),
function, coerced_params, NULL_TREE); function, coerced_params, NULL_TREE);
TREE_SIDE_EFFECTS (result) = 1; TREE_SIDE_EFFECTS (result) = 1;
if (require_constant_value) if (require_constant_value)
...@@ -2246,7 +2246,7 @@ pointer_diff (tree op0, tree op1) ...@@ -2246,7 +2246,7 @@ pointer_diff (tree op0, tree op1)
op1 = c_size_in_bytes (target_type); op1 = c_size_in_bytes (target_type);
/* Divide by the size, in easiest possible way. */ /* Divide by the size, in easiest possible way. */
return fold (build (EXACT_DIV_EXPR, restype, op0, convert (restype, op1))); return fold (build2 (EXACT_DIV_EXPR, restype, op0, convert (restype, op1)));
} }
/* Construct and perhaps optimize a tree representation /* Construct and perhaps optimize a tree representation
...@@ -2395,8 +2395,8 @@ build_unary_op (enum tree_code code, tree xarg, int flag) ...@@ -2395,8 +2395,8 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
arg = stabilize_reference (arg); arg = stabilize_reference (arg);
real = build_unary_op (REALPART_EXPR, arg, 1); real = build_unary_op (REALPART_EXPR, arg, 1);
imag = build_unary_op (IMAGPART_EXPR, arg, 1); imag = build_unary_op (IMAGPART_EXPR, arg, 1);
return build (COMPLEX_EXPR, TREE_TYPE (arg), return build2 (COMPLEX_EXPR, TREE_TYPE (arg),
build_unary_op (code, real, 1), imag); build_unary_op (code, real, 1), imag);
} }
/* Report invalid types. */ /* Report invalid types. */
...@@ -2466,7 +2466,7 @@ build_unary_op (enum tree_code code, tree xarg, int flag) ...@@ -2466,7 +2466,7 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
if (TREE_CODE (TREE_TYPE (arg)) == BOOLEAN_TYPE) if (TREE_CODE (TREE_TYPE (arg)) == BOOLEAN_TYPE)
val = boolean_increment (code, arg); val = boolean_increment (code, arg);
else else
val = build (code, TREE_TYPE (arg), arg, inc); val = build2 (code, TREE_TYPE (arg), arg, inc);
TREE_SIDE_EFFECTS (val) = 1; TREE_SIDE_EFFECTS (val) = 1;
val = convert (result_type, val); val = convert (result_type, val);
if (TREE_CODE (val) != code) if (TREE_CODE (val) != code)
...@@ -2535,9 +2535,9 @@ build_unary_op (enum tree_code code, tree xarg, int flag) ...@@ -2535,9 +2535,9 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
return error_mark_node; return error_mark_node;
} }
addr = fold (build (PLUS_EXPR, argtype, addr = fold (build2 (PLUS_EXPR, argtype,
convert (argtype, addr), convert (argtype, addr),
convert (argtype, byte_position (field)))); convert (argtype, byte_position (field))));
} }
else else
addr = build1 (code, argtype, arg); addr = build1 (code, argtype, arg);
...@@ -2867,7 +2867,7 @@ build_conditional_expr (tree ifexp, tree op1, tree op2) ...@@ -2867,7 +2867,7 @@ build_conditional_expr (tree ifexp, tree op1, tree op2)
if (TREE_CODE (ifexp) == INTEGER_CST) if (TREE_CODE (ifexp) == INTEGER_CST)
return non_lvalue (integer_zerop (ifexp) ? op2 : op1); return non_lvalue (integer_zerop (ifexp) ? op2 : op1);
return fold (build (COND_EXPR, result_type, ifexp, op1, op2)); return fold (build3 (COND_EXPR, result_type, ifexp, op1, op2));
} }
/* Return a compound expression that performs two expressions and /* Return a compound expression that performs two expressions and
...@@ -2901,7 +2901,7 @@ build_compound_expr (tree expr1, tree expr2) ...@@ -2901,7 +2901,7 @@ build_compound_expr (tree expr1, tree expr2)
else if (warn_unused_value) else if (warn_unused_value)
warn_if_unused_value (expr1, input_location); warn_if_unused_value (expr1, input_location);
return build (COMPOUND_EXPR, TREE_TYPE (expr2), expr1, expr2); return build2 (COMPOUND_EXPR, TREE_TYPE (expr2), expr1, expr2);
} }
/* Build an expression representing a cast to type TYPE of expression EXPR. */ /* Build an expression representing a cast to type TYPE of expression EXPR. */
...@@ -3223,7 +3223,7 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs) ...@@ -3223,7 +3223,7 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
/* Scan operands */ /* Scan operands */
result = build (MODIFY_EXPR, lhstype, lhs, newrhs); result = build2 (MODIFY_EXPR, lhstype, lhs, newrhs);
TREE_SIDE_EFFECTS (result) = 1; TREE_SIDE_EFFECTS (result) = 1;
/* If we got the LHS in a different type for storing in, /* If we got the LHS in a different type for storing in,
...@@ -6217,7 +6217,7 @@ c_finish_goto_label (tree label) ...@@ -6217,7 +6217,7 @@ c_finish_goto_label (tree label)
return NULL_TREE; return NULL_TREE;
TREE_USED (decl) = 1; TREE_USED (decl) = 1;
return add_stmt (build (GOTO_EXPR, void_type_node, decl)); return add_stmt (build1 (GOTO_EXPR, void_type_node, decl));
} }
/* Generate a computed goto statement to EXPR. */ /* Generate a computed goto statement to EXPR. */
...@@ -6228,7 +6228,7 @@ c_finish_goto_ptr (tree expr) ...@@ -6228,7 +6228,7 @@ c_finish_goto_ptr (tree expr)
if (pedantic) if (pedantic)
pedwarn ("ISO C forbids `goto *expr;'"); pedwarn ("ISO C forbids `goto *expr;'");
expr = convert (ptr_type_node, expr); expr = convert (ptr_type_node, expr);
return add_stmt (build (GOTO_EXPR, void_type_node, expr)); return add_stmt (build1 (GOTO_EXPR, void_type_node, expr));
} }
/* Generate a C `return' statement. RETVAL is the expression for what /* Generate a C `return' statement. RETVAL is the expression for what
...@@ -6319,7 +6319,7 @@ c_finish_return (tree retval) ...@@ -6319,7 +6319,7 @@ c_finish_return (tree retval)
break; break;
} }
retval = build (MODIFY_EXPR, TREE_TYPE (res), res, t); retval = build2 (MODIFY_EXPR, TREE_TYPE (res), res, t);
} }
return add_stmt (build_stmt (RETURN_EXPR, retval)); return add_stmt (build_stmt (RETURN_EXPR, retval));
...@@ -6554,7 +6554,7 @@ c_finish_loop (location_t start_locus, tree cond, tree incr, tree body, ...@@ -6554,7 +6554,7 @@ c_finish_loop (location_t start_locus, tree cond, tree incr, tree body,
} }
t = build_and_jump (&blab); t = build_and_jump (&blab);
exit = build (COND_EXPR, void_type_node, cond, exit, t); exit = build3 (COND_EXPR, void_type_node, cond, exit, t);
exit = fold (exit); exit = fold (exit);
if (cond_is_first) if (cond_is_first)
SET_EXPR_LOCATION (exit, start_locus); SET_EXPR_LOCATION (exit, start_locus);
...@@ -6595,7 +6595,7 @@ c_finish_bc_stmt (tree *label_p, bool is_break) ...@@ -6595,7 +6595,7 @@ c_finish_bc_stmt (tree *label_p, bool is_break)
return NULL_TREE; return NULL_TREE;
} }
return add_stmt (build (GOTO_EXPR, void_type_node, label)); return add_stmt (build1 (GOTO_EXPR, void_type_node, label));
} }
/* A helper routine for c_process_expr_stmt and c_finish_stmt_expr. */ /* A helper routine for c_process_expr_stmt and c_finish_stmt_expr. */
...@@ -6760,10 +6760,10 @@ c_finish_stmt_expr (tree body) ...@@ -6760,10 +6760,10 @@ c_finish_stmt_expr (tree body)
&& TREE_TYPE (val) == TREE_TYPE (TREE_OPERAND (val, 0))) && TREE_TYPE (val) == TREE_TYPE (TREE_OPERAND (val, 0)))
val = TREE_OPERAND (val, 0); val = TREE_OPERAND (val, 0);
*last_p = build (MODIFY_EXPR, void_type_node, tmp, val); *last_p = build2 (MODIFY_EXPR, void_type_node, tmp, val);
SET_EXPR_LOCUS (*last_p, EXPR_LOCUS (last)); SET_EXPR_LOCUS (*last_p, EXPR_LOCUS (last));
return build (TARGET_EXPR, type, tmp, body, NULL_TREE, NULL_TREE); return build4 (TARGET_EXPR, type, tmp, body, NULL_TREE, NULL_TREE);
} }
/* Begin and end compound statements. This is as simple as pushing /* Begin and end compound statements. This is as simple as pushing
...@@ -6802,7 +6802,7 @@ c_end_compound_stmt (tree stmt, bool do_scope) ...@@ -6802,7 +6802,7 @@ c_end_compound_stmt (tree stmt, bool do_scope)
&& STATEMENT_LIST_STMT_EXPR (cur_stmt_list) && STATEMENT_LIST_STMT_EXPR (cur_stmt_list)
&& TREE_CODE (stmt) != BIND_EXPR) && TREE_CODE (stmt) != BIND_EXPR)
{ {
stmt = build (BIND_EXPR, void_type_node, NULL, stmt, NULL); stmt = build3 (BIND_EXPR, void_type_node, NULL, stmt, NULL);
TREE_SIDE_EFFECTS (stmt) = 1; TREE_SIDE_EFFECTS (stmt) = 1;
} }
...@@ -7553,7 +7553,7 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, ...@@ -7553,7 +7553,7 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
build_type = result_type; build_type = result_type;
{ {
tree result = build (resultcode, build_type, op0, op1); tree result = build2 (resultcode, build_type, op0, op1);
/* Treat expressions in initializers specially as they can't trap. */ /* Treat expressions in initializers specially as they can't trap. */
result = require_constant_value ? fold_initializer (result) result = require_constant_value ? fold_initializer (result)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment