diff options
author | Jason Merrill <jason@redhat.com> | 2012-05-30 18:07:14 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-05-30 18:07:14 -0400 |
commit | 989e6706f1077a333b515ffd1abc8ab73a016562 (patch) | |
tree | 8753454703589ae8cd9b661201d622fc6c1ea171 /gcc | |
parent | a932fb8932eed43020dd8fe38147f41b0100f497 (diff) | |
download | gcc-989e6706f1077a333b515ffd1abc8ab73a016562.zip gcc-989e6706f1077a333b515ffd1abc8ab73a016562.tar.gz gcc-989e6706f1077a333b515ffd1abc8ab73a016562.tar.bz2 |
* tree.c (stabilize_expr): Tweak logic.
From-SVN: r188028
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/tree.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f5ba6af..89cbc90 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2012-05-30 Jason Merrill <jason@redhat.com> + * tree.c (stabilize_expr): Tweak logic. + PR c++/53356 * tree.c (stabilize_init): Side effects make the init unstable. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 897d4d7..4e7056f 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -3283,8 +3283,8 @@ stabilize_expr (tree exp, tree* initp) init_expr = NULL_TREE; else if (VOID_TYPE_P (TREE_TYPE (exp))) { - *initp = exp; - return void_zero_node; + init_expr = exp; + exp = void_zero_node; } /* There are no expressions with REFERENCE_TYPE, but there can be call arguments with such a type; just treat it as a pointer. */ |