Commit b771925e by Alexandre Petit-Bianco Committed by Alexandre Petit-Bianco

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
parent 309dd885
......@@ -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,
......
......@@ -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);
}
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment