Commit 364460b6 by Mark Mitchell Committed by Mark Mitchell

decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups here.

	* decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
	here.
	* semantics.c (finish_expr_stmt): Call it here instead.  Move
	default_conversion logic to semantic-analysis time.

From-SVN: r30520
parent 2cfcc23e
1999-11-12 Mark Mitchell <mark@codesourcery.com>
* decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
here.
* semantics.c (finish_expr_stmt): Call it here instead. Move
default_conversion logic to semantic-analysis time.
1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
* rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
......
......@@ -14155,7 +14155,7 @@ cplus_expand_expr_stmt (exp)
trying to do TYPE_MODE on the ERROR_MARK, and really
go outside the bounds of the type. */
if (exp != error_mark_node)
expand_expr_stmt (break_out_cleanups (exp));
expand_expr_stmt (exp);
}
/* When a stmt has been parsed, this function is called. */
......
......@@ -127,18 +127,25 @@ finish_expr_stmt (expr)
if (expr != NULL_TREE)
{
if (building_stmt_tree ())
add_tree (build_min_nt (EXPR_STMT, expr));
else
{
emit_line_note (input_filename, lineno);
/* Do default conversion if safe and possibly important,
in case within ({...}). */
if (!stmts_are_full_exprs_p &&
((TREE_CODE (TREE_TYPE (expr)) == ARRAY_TYPE
&& lvalue_p (expr))
|| TREE_CODE (TREE_TYPE (expr)) == FUNCTION_TYPE))
if (!processing_template_decl
&& !stmts_are_full_exprs_p
&& ((TREE_CODE (TREE_TYPE (expr)) == ARRAY_TYPE
&& lvalue_p (expr))
|| TREE_CODE (TREE_TYPE (expr)) == FUNCTION_TYPE))
expr = default_conversion (expr);
if (!processing_template_decl)
expr = break_out_cleanups (expr);
add_tree (build_min_nt (EXPR_STMT, expr));
}
else
{
emit_line_note (input_filename, lineno);
if (stmts_are_full_exprs_p)
expand_start_target_temps ();
......
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