Commit bbcfd969 by Ian Lance Taylor Committed by Ian Lance Taylor

c-semantics.c (build_stmt): Remove test of specific tree codes for TREE_SIDE_EFFECTS handling.

	* c-semantics.c (build_stmt): Remove test of specific tree codes
	for TREE_SIDE_EFFECTS handling.

From-SVN: r98693
parent 95457597
2005-04-24 Ian Lance Taylor <ian@airs.com>
* c-semantics.c (build_stmt): Remove test of specific tree codes
for TREE_SIDE_EFFECTS handling.
2005-04-24 Per Bothner <per@bothner.com> 2005-04-24 Per Bothner <per@bothner.com>
* c-opts.c (finish_options): Make the line-number of the <built-in> * c-opts.c (finish_options): Make the line-number of the <built-in>
......
...@@ -149,19 +149,12 @@ build_stmt (enum tree_code code, ...) ...@@ -149,19 +149,12 @@ build_stmt (enum tree_code code, ...)
length = TREE_CODE_LENGTH (code); length = TREE_CODE_LENGTH (code);
SET_EXPR_LOCATION (ret, input_location); SET_EXPR_LOCATION (ret, input_location);
/* Most statements have implicit side effects all on their own, /* TREE_SIDE_EFFECTS will already be set for statements with
such as control transfer. For those that do, we'll compute implicit side effects. Here we make sure it is set for other
the real value of TREE_SIDE_EFFECTS from its arguments. */ expressions by checking whether the parameters have side
switch (code) effects. */
{
case EXPR_STMT:
side_effects = false;
break;
default:
side_effects = true;
break;
}
side_effects = false;
for (i = 0; i < length; i++) for (i = 0; i < length; i++)
{ {
tree t = va_arg (p, tree); tree t = va_arg (p, tree);
...@@ -170,7 +163,7 @@ build_stmt (enum tree_code code, ...) ...@@ -170,7 +163,7 @@ build_stmt (enum tree_code code, ...)
TREE_OPERAND (ret, i) = t; TREE_OPERAND (ret, i) = t;
} }
TREE_SIDE_EFFECTS (ret) = side_effects; TREE_SIDE_EFFECTS (ret) |= side_effects;
va_end (p); va_end (p);
return ret; return ret;
......
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