+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.
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. */
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 ();