* tree.c (stabilize_expr): Tweak logic.

From-SVN: r188028
This commit is contained in:
Jason Merrill 2012-05-30 18:07:14 -04:00 committed by Jason Merrill
parent a932fb8932
commit 989e6706f1
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
2012-05-30 Jason Merrill <jason@redhat.com> 2012-05-30 Jason Merrill <jason@redhat.com>
* tree.c (stabilize_expr): Tweak logic.
PR c++/53356 PR c++/53356
* tree.c (stabilize_init): Side effects make the init unstable. * tree.c (stabilize_init): Side effects make the init unstable.

View File

@ -3283,8 +3283,8 @@ stabilize_expr (tree exp, tree* initp)
init_expr = NULL_TREE; init_expr = NULL_TREE;
else if (VOID_TYPE_P (TREE_TYPE (exp))) else if (VOID_TYPE_P (TREE_TYPE (exp)))
{ {
*initp = exp; init_expr = exp;
return void_zero_node; exp = void_zero_node;
} }
/* There are no expressions with REFERENCE_TYPE, but there can be call /* There are no expressions with REFERENCE_TYPE, but there can be call
arguments with such a type; just treat it as a pointer. */ arguments with such a type; just treat it as a pointer. */