aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>1999-05-13 19:01:19 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>1999-05-13 12:01:19 -0700
commit1fb89a4d595c742e276d07e1a5fb1c4a8a01d214 (patch)
treeaef77c219f962d69ae65bd3235c2be05ac9ef42d /gcc/java/parse.c
parentaca1a6cbac86e5ad77db427f58fbd8750d55f1ac (diff)
downloadgcc-1fb89a4d595c742e276d07e1a5fb1c4a8a01d214.zip
gcc-1fb89a4d595c742e276d07e1a5fb1c4a8a01d214.tar.gz
gcc-1fb89a4d595c742e276d07e1a5fb1c4a8a01d214.tar.bz2
parse.y (java_check_regular_methods): Warning check on not overriding methods with default access in other packages...
Thu May 13 18:30:48 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_check_regular_methods): Warning check on not overriding methods with default access in other packages does not apply to `<clinit>'. (java_complete_lhs): If block body is an empty_stmt_node, replace it by NULL_TREE. This avoid gcc generating an irrelevant warning. From-SVN: r26930
Diffstat (limited to 'gcc/java/parse.c')
-rw-r--r--gcc/java/parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index 56e30d3..92ed988 100644
--- a/gcc/java/parse.c
+++ b/gcc/java/parse.c
@@ -7222,6 +7222,7 @@ java_check_regular_methods (class_decl)
if (DECL_CONTEXT (found) != object_type_node
&& ((aflags & 0x7) == 0)
&& !class_in_current_package (DECL_CONTEXT (found))
+ && DECL_NAME (found) != clinit_identifier_node
&& flag_not_overriding)
{
parse_warning_context
@@ -10473,7 +10474,10 @@ java_complete_lhs (node)
COMPLETE_CHECK_OP_1 (node);
TREE_TYPE (node) = void_type_node;
POP_LABELED_BLOCK ();
- if (CAN_COMPLETE_NORMALLY (LABELED_BLOCK_BODY (node)))
+
+ if (LABELED_BLOCK_BODY (node) == empty_stmt_node)
+ LABELED_BLOCK_BODY (node) = NULL_TREE;
+ else if (CAN_COMPLETE_NORMALLY (LABELED_BLOCK_BODY (node)))
CAN_COMPLETE_NORMALLY (node) = 1;
return node;