OSDN Git Service

Thu Sep 16 15:42:39 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Sep 1999 15:53:23 +0000 (15:53 +0000)
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Sep 1999 15:53:23 +0000 (15:53 +0000)
* 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)

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29550 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/parse.c
gcc/java/parse.y

index acfd311..1d9ca39 100644 (file)
@@ -6,6 +6,11 @@
 
        * lang.c (lang_decode_option): Extend comment.
 
+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.
+
 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * gjavah.c (get_field_name, print_method_info, print_include,
index 7d8571e..d19a78c 100644 (file)
@@ -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);
 }
 
index 59b2144..3d76576 100644 (file)
@@ -5841,8 +5841,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);
 }