+1999-10-04 Mark Mitchell <mark@codesourcery.com>
+
+ * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
+ situations where make_node will do it automatically.
+ * decl.c (grok_reference_init): Likewise.
+ (expand_static_init): Likewise.
+ (do_static_initialization): Likewise.
+ * init.c (perform_member_init): Likewise.
+ (expand_aggr_init_1): Likewise.
+ (build_new_1): Likewise.
+ * method.c (do_build_copy_constructor): Likewise.
+ (do_build_assign_ref): Likewise.
+ * search.c (expand_upcast_fixups): Likewise.
+ * semantics.c (finish_stmt_expr): Likewise.
+ * typeck.c (build_unary_op): Likewise.
+ (check_return_expr): Likewise.
+
1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
* init.c (build_vec_delete_1): Fold COND_EXPRs.
val = build (is_empty_class (DECL_CLASS_CONTEXT (fn))
? MODIFY_EXPR : INIT_EXPR,
DECL_CONTEXT (fn), to, arg);
- TREE_SIDE_EFFECTS (val) = 1;
address = build_unary_op (ADDR_EXPR, val, 0);
/* Avoid a warning about this expression, if the address is
never used. */
arg = build_indirect_ref (TREE_VALUE (TREE_CHAIN (converted_args)), 0);
val = build (MODIFY_EXPR, TREE_TYPE (to), to, arg);
- TREE_SIDE_EFFECTS (val) = 1;
return val;
}
{
/* Initialize the declaration. */
tmp = build (INIT_EXPR, TREE_TYPE (decl), decl, tmp);
- /* Setting TREE_SIDE_EFFECTS prevents expand_expr from
- omitting this expression entirely. */
- TREE_SIDE_EFFECTS (tmp) = 1;
finish_expr_stmt (tmp);
}
else
|| (init && TREE_CODE (init) == TREE_LIST))
assignment = build_aggr_init (decl, init, 0);
else if (init)
- {
- /* The initialization we're doing here is just a bitwise
- copy. */
- assignment = build (INIT_EXPR, TREE_TYPE (decl), decl, init);
- TREE_SIDE_EFFECTS (assignment) = 1;
- }
+ /* The initialization we're doing here is just a bitwise
+ copy. */
+ assignment = build (INIT_EXPR, TREE_TYPE (decl), decl, init);
else
assignment = NULL_TREE;
if (ANON_AGGR_TYPE_P (type))
{
init = build (INIT_EXPR, type, decl, TREE_VALUE (init));
- TREE_SIDE_EFFECTS (init) = 1;
finish_expr_stmt (init);
}
else if (TYPE_NEEDS_CONSTRUCTING (type)
expand_decl_init (exp);
}
else
- {
- tree t = build (INIT_EXPR, type, exp, init);
- TREE_SIDE_EFFECTS (t) = 1;
- finish_expr_stmt (t);
- }
+ finish_expr_stmt (build (INIT_EXPR, type, exp, init));
return;
}
build_component_ref (cookie, nelts_identifier,
NULL_TREE, 0),
nelts);
- TREE_SIDE_EFFECTS (exp1) = 1;
rval = cp_convert (build_pointer_type (true_type), rval);
rval = build_compound_expr
(tree_cons (NULL_TREE, exp1,
end = build (MODIFY_EXPR, TREE_TYPE (sentry),
sentry, boolean_false_node);
- TREE_SIDE_EFFECTS (end) = 1;
buf = TREE_OPERAND (rval, 0);
else if (TYPE_HAS_TRIVIAL_INIT_REF (current_class_type))
{
t = build (INIT_EXPR, void_type_node, current_class_ref, parm);
- TREE_SIDE_EFFECTS (t) = 1;
finish_expr_stmt (t);
}
else
else if (TYPE_HAS_TRIVIAL_ASSIGN_REF (current_class_type))
{
tree t = build (MODIFY_EXPR, void_type_node, current_class_ref, parm);
- TREE_SIDE_EFFECTS (t) = 1;
finish_expr_stmt (t);
}
else
init = build (MODIFY_EXPR, TREE_TYPE (nvtbl),
nvtbl, vtbl);
- TREE_SIDE_EFFECTS (init) = 1;
finish_expr_stmt (init);
/* Update the vtable pointers as necessary. */
ref = build_vfield_ref
tree result;
if (!building_stmt_tree ())
- {
- rtl_expr = expand_end_stmt_expr (rtl_expr);
- /* The statements have side effects, so the group does too. */
- TREE_SIDE_EFFECTS (rtl_expr) = 1;
- }
+ rtl_expr = expand_end_stmt_expr (rtl_expr);
if (building_stmt_tree ())
{
|| code == POSTINCREMENT_EXPR)
? PLUS_EXPR : MINUS_EXPR),
argtype, value, inc);
- TREE_SIDE_EFFECTS (incremented) = 1;
modify = build_modify_expr (arg, NOP_EXPR, incremented);
compound = build (COMPOUND_EXPR, TREE_TYPE (arg), modify, value);
arg = stabilize_reference (arg);
val = build (MODIFY_EXPR, TREE_TYPE (arg), arg,
boolean_true_node);
- TREE_SIDE_EFFECTS (val) = 1;
arg = save_expr (arg);
val = build (COMPOUND_EXPR, TREE_TYPE (arg), val, arg);
val = build (COMPOUND_EXPR, TREE_TYPE (arg), arg, val);
/* Actually copy the value returned into the appropriate location. */
if (retval && retval != result)
- {
- retval = build (INIT_EXPR, TREE_TYPE (result), result, retval);
- TREE_SIDE_EFFECTS (retval) = 1;
- }
+ retval = build (INIT_EXPR, TREE_TYPE (result), result, retval);
/* All done. Remember that this function did return a value. */
current_function_returns_value = 1;