aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>1999-09-21 15:53:23 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>1999-09-21 08:53:23 -0700
commitb771925e7ed1fa2d5f528fe515ab4698f2bd45c8 (patch)
treebe78ec0ab69bf96c9106497110d0804c8922b48b /gcc/java/parse.c
parent309dd885ff9f569aec12cb5e3281a3b4dd73a8e0 (diff)
downloadgcc-b771925e7ed1fa2d5f528fe515ab4698f2bd45c8.zip
gcc-b771925e7ed1fa2d5f528fe515ab4698f2bd45c8.tar.gz
gcc-b771925e7ed1fa2d5f528fe515ab4698f2bd45c8.tar.bz2
re GNATS gcj/46 (Static inializers compiled incorrectly)
Thu Sep 16 15:42:39 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK instead of fndecl. (This patch fixes the net Java PR #46: http://sourceware.cygnus.com/ml/java-prs/1999-q3/msg00092.html) From-SVN: r29550
Diffstat (limited to 'gcc/java/parse.c')
-rw-r--r--gcc/java/parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index 7d8571e..d19a78c 100644
--- a/gcc/java/parse.c
+++ b/gcc/java/parse.c
@@ -8428,8 +8428,8 @@ tree
java_method_add_stmt (fndecl, expr)
tree fndecl, expr;
{
- if (!fndecl)
- return NULL;
+ if (!GET_CURRENT_BLOCK (fndecl))
+ return NULL_TREE;
return add_stmt_to_block (GET_CURRENT_BLOCK (fndecl), NULL_TREE, expr);
}