diff options
author | Andrew Haley <aph@cygnus.com> | 1999-07-15 05:17:08 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 1999-07-15 05:17:08 +0000 |
commit | e533f648afeea51f6c8d2e2c26306aff0a947867 (patch) | |
tree | 6c8bb8319f9ea05b4197f208e8ade94b50974da2 | |
parent | 39df13d95d75ce4a5295ddad78dab75d4677f737 (diff) | |
download | gcc-e533f648afeea51f6c8d2e2c26306aff0a947867.zip gcc-e533f648afeea51f6c8d2e2c26306aff0a947867.tar.gz gcc-e533f648afeea51f6c8d2e2c26306aff0a947867.tar.bz2 |
expr.c (expand_expr): Do not return the last statement in a block as the block's value.
1999-07-14 Andrew Haley <aph@cygnus.com>
* expr.c (expand_expr): Do not return the last statement in a
block as the block's value.
From-SVN: r28112
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/expr.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index df78c42..d170b3d 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +1999-07-14 Andrew Haley <aph@cygnus.com> + + * expr.c (expand_expr): Do not return the last statement in a + block as the block's value. + Sat Jul 3 22:26:32 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 8998bdb..d47ed1a 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1895,7 +1895,6 @@ java_lang_expand_expr (exp, target, tmode, modifier) { tree local; tree body = BLOCK_EXPR_BODY (exp); - struct rtx_def *to_return; pushlevel (2); /* 2 and above */ expand_start_bindings (0); local = BLOCK_EXPR_DECLS (exp); @@ -1913,10 +1912,11 @@ java_lang_expand_expr (exp, target, tmode, modifier) emit_queue (); body = TREE_OPERAND (body, 1); } - to_return = expand_expr (body, target, tmode, modifier); + expand_expr (body, const0_rtx, VOIDmode, 0); + emit_queue (); poplevel (1, 1, 0); expand_end_bindings (getdecls (), 1, 0); - return to_return; + return const0_rtx; } break; |