Commit 440a6c2a by Jason Merrill Committed by Jason Merrill

parse.y (simple_stmt): If the condition isn't a declaration, start the…

parse.y (simple_stmt): If the condition isn't a declaration, start the controlled block after the test.

	* parse.y (simple_stmt): If the condition isn't a declaration,
	start the controlled block after the test.

From-SVN: r17967
parent 442f0a30
Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
* parse.y (simple_stmt): If the condition isn't a declaration,
start the controlled block after the test.
Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* call.c (build_over_call): Convert builtin abs, labs and fabs to
......
......@@ -3654,6 +3654,15 @@ simple_stmt:
emit_line_note (input_filename, lineno);
expand_exit_loop_if_false (0, $4);
}
/* If the condition wasn't a declaration, clear out the
block we made for it and start a new one here so the
optimization in expand_end_loop will work. */
if (TREE_CODE ($4) != VAR_DECL)
{
do_poplevel ();
do_pushlevel ();
}
}
already_scoped_stmt .poplevel
{
......@@ -3763,6 +3772,15 @@ simple_stmt:
emit_line_note (input_filename, lineno);
if ($7) expand_exit_loop_if_false (0, $7);
}
/* If the condition wasn't a declaration, clear out the
block we made for it and start a new one here so the
optimization in expand_end_loop will work. */
if ($7 == NULL_TREE || TREE_CODE ($7) != VAR_DECL)
{
do_poplevel ();
do_pushlevel ();
}
}
xexpr ')'
/* Don't let the tree nodes for $10 be discarded
......
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