mirror of git://gcc.gnu.org/git/gcc.git
Really fix PR c++/36408
gcc/cp/ChangeLog: PR c++/36408 * semantics.c (empty_expr_stmt_p): Handle void_zero_node and fix bad indentation. * pt.c (tsubst_copy_and_build): Fix typo. From-SVN: r154742
This commit is contained in:
parent
0c31c577ac
commit
489df541a7
|
@ -1,3 +1,10 @@
|
||||||
|
2009-11-29 Dodji Seketeli <dodji@redhat.com>
|
||||||
|
|
||||||
|
PR c++/36408
|
||||||
|
* semantics.c (empty_expr_stmt_p): Handle void_zero_node and fix
|
||||||
|
bad indentation.
|
||||||
|
* pt.c (tsubst_copy_and_build): Fix typo.
|
||||||
|
|
||||||
2009-11-29 Jan Hubicka <jh@suse.cz>
|
2009-11-29 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
* optimize.c (maybe_clone_body): Emit thunks associated to alias.
|
* optimize.c (maybe_clone_body): Emit thunks associated to alias.
|
||||||
|
|
|
@ -12546,8 +12546,8 @@ tsubst_copy_and_build (tree t,
|
||||||
|
|
||||||
/* If the resulting list of expression statement is empty,
|
/* If the resulting list of expression statement is empty,
|
||||||
fold it further into void_zero_node. */
|
fold it further into void_zero_node. */
|
||||||
if (empty_expr_stmt_p (cur_stmt_expr))
|
if (empty_expr_stmt_p (stmt_expr))
|
||||||
cur_stmt_expr = void_zero_node;
|
stmt_expr = void_zero_node;
|
||||||
|
|
||||||
return stmt_expr;
|
return stmt_expr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1855,6 +1855,9 @@ empty_expr_stmt_p (tree expr_stmt)
|
||||||
{
|
{
|
||||||
tree body = NULL_TREE;
|
tree body = NULL_TREE;
|
||||||
|
|
||||||
|
if (expr_stmt == void_zero_node)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (expr_stmt)
|
if (expr_stmt)
|
||||||
{
|
{
|
||||||
if (TREE_CODE (expr_stmt) == EXPR_STMT)
|
if (TREE_CODE (expr_stmt) == EXPR_STMT)
|
||||||
|
@ -1863,13 +1866,13 @@ empty_expr_stmt_p (tree expr_stmt)
|
||||||
body = expr_stmt;
|
body = expr_stmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (body)
|
if (body)
|
||||||
{
|
{
|
||||||
if (TREE_CODE (body) == STATEMENT_LIST)
|
if (TREE_CODE (body) == STATEMENT_LIST)
|
||||||
return tsi_end_p (tsi_start (body));
|
return tsi_end_p (tsi_start (body));
|
||||||
else
|
else
|
||||||
return empty_expr_stmt_p (body);
|
return empty_expr_stmt_p (body);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue