Commit 447cfcb9 by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (finish_stmt_expr): Change prototype.

	* cp-tree.h (finish_stmt_expr): Change prototype.
	* expr.c (cplus_expand_expr): Adjust call accordingly.
	* init.c (finish_init_stmts): Likewise.
	* parse.y (primary): Likewise.
	* pt.c (tsubst_copy): Likewise.
	* semantics.c (finish_stmt_expr): Don't take two parameters.
	Don't remove generated BLOCKs from the block-tree.

From-SVN: r29533
parent ea003f6d
1999-09-20 Mark Mitchell <mark@codesourcery.com> 1999-09-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (finish_stmt_expr): Change prototype.
* expr.c (cplus_expand_expr): Adjust call accordingly.
* init.c (finish_init_stmts): Likewise.
* parse.y (primary): Likewise.
* pt.c (tsubst_copy): Likewise.
* semantics.c (finish_stmt_expr): Don't take two parameters.
Don't remove generated BLOCKs from the block-tree.
Remove support for assigning to `this'. Remove support for assigning to `this'.
* NEWS: Note that fact. * NEWS: Note that fact.
* class.c (build_vbase_path): Don't check flag_this_is_variable. * class.c (build_vbase_path): Don't check flag_this_is_variable.
......
...@@ -3674,7 +3674,7 @@ extern void finish_label_decl PROTO((tree)); ...@@ -3674,7 +3674,7 @@ extern void finish_label_decl PROTO((tree));
extern void finish_subobject PROTO((tree)); extern void finish_subobject PROTO((tree));
extern tree finish_parenthesized_expr PROTO((tree)); extern tree finish_parenthesized_expr PROTO((tree));
extern tree begin_stmt_expr PROTO((void)); extern tree begin_stmt_expr PROTO((void));
extern tree finish_stmt_expr PROTO((tree, tree)); extern tree finish_stmt_expr PROTO((tree));
extern tree finish_call_expr PROTO((tree, tree, int)); extern tree finish_call_expr PROTO((tree, tree, int));
extern tree finish_increment_expr PROTO((tree, enum tree_code)); extern tree finish_increment_expr PROTO((tree, enum tree_code));
extern tree finish_this_expr PROTO((void)); extern tree finish_this_expr PROTO((void));
......
...@@ -245,8 +245,8 @@ cplus_expand_expr (exp, target, tmode, modifier) ...@@ -245,8 +245,8 @@ cplus_expand_expr (exp, target, tmode, modifier)
case STMT_EXPR: case STMT_EXPR:
{ {
tree rtl_expr = begin_stmt_expr (); tree rtl_expr = begin_stmt_expr ();
tree block = expand_stmt (STMT_EXPR_STMT (exp)); expand_stmt (STMT_EXPR_STMT (exp));
finish_stmt_expr (rtl_expr, block); finish_stmt_expr (rtl_expr);
return expand_expr (rtl_expr, target, tmode, modifier); return expand_expr (rtl_expr, target, tmode, modifier);
} }
break; break;
......
...@@ -990,10 +990,8 @@ finish_init_stmts (stmt_expr, compound_stmt) ...@@ -990,10 +990,8 @@ finish_init_stmts (stmt_expr, compound_stmt)
tree compound_stmt; tree compound_stmt;
{ {
pop_momentary (); pop_momentary ();
stmt_expr finish_compound_stmt (/*has_no_scope=*/1, compound_stmt);
= finish_stmt_expr (stmt_expr, stmt_expr = finish_stmt_expr (stmt_expr);
finish_compound_stmt (/*has_no_scope=*/1,
compound_stmt));
/* To avoid spurious warnings about unused values, we set /* To avoid spurious warnings about unused values, we set
TREE_USED. */ TREE_USED. */
......
...@@ -1446,7 +1446,7 @@ primary: ...@@ -1446,7 +1446,7 @@ primary:
$<ttype>$ = begin_stmt_expr (); $<ttype>$ = begin_stmt_expr ();
} }
compstmt ')' compstmt ')'
{ $$ = finish_stmt_expr ($<ttype>2, $3); } { $$ = finish_stmt_expr ($<ttype>2); }
/* Koenig lookup support /* Koenig lookup support
We could store lastiddecl in $1 to avoid another lookup, We could store lastiddecl in $1 to avoid another lookup,
but that would result in many additional reduce/reduce conflicts. */ but that would result in many additional reduce/reduce conflicts. */
......
...@@ -7085,9 +7085,9 @@ tsubst_copy (t, args, complain, in_decl) ...@@ -7085,9 +7085,9 @@ tsubst_copy (t, args, complain, in_decl)
if (!processing_template_decl) if (!processing_template_decl)
{ {
tree rtl_expr = begin_stmt_expr (); tree rtl_expr = begin_stmt_expr ();
tree block = tsubst_expr (STMT_EXPR_STMT (t), args, tsubst_expr (STMT_EXPR_STMT (t), args,
complain, in_decl); complain, in_decl);
return finish_stmt_expr (rtl_expr, block); return finish_stmt_expr (rtl_expr);
} }
return t; return t;
......
// Build don't link:
// Special g++ Options: -O
// Origin: Thomas Kunert <kunert@physik.tu-dresden.de>
#include <ctype.h>
bool f( char c )
{
return tolower( c );
}
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