diff options
author | Per Bothner <bothner@cygnus.com> | 1998-11-15 14:37:52 +0000 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1998-11-15 06:37:52 -0800 |
commit | 9bbc7d9f4c30d9cf34a79c8b36a7e4f0857d764d (patch) | |
tree | 57ca81d68872cd1049e8022307078e2a68dd88b8 /gcc/java/decl.c | |
parent | 175135a659ad8d2ba5e827c1404d42d4924d98fc (diff) | |
download | gcc-9bbc7d9f4c30d9cf34a79c8b36a7e4f0857d764d.zip gcc-9bbc7d9f4c30d9cf34a79c8b36a7e4f0857d764d.tar.gz gcc-9bbc7d9f4c30d9cf34a79c8b36a7e4f0857d764d.tar.bz2 |
decl.c (error_mark_node): New global.
�
* decl.c (error_mark_node), java-tree.h: New global.
* parse.y: Use empty_stmt_node instead of size_zero_node.
(build_if_else_statement): If missing else, use empty_stmt_node.
* parse.y (not_initialized_as_it_should_p): Removed, with its callers.
(java_complete_expand_method): Complain if return is missing.
(java_check_regular_methods): Comment out incorrect error check.
(not_accessible_p): Fix incorrect handling of protected methods.
(patch_method_invocation): Pass correct context to not_accessible_p.
(find_applicable_accessible_methods_list): Likewise.
(qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
(java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
(patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
* jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
(push_int_const): Remove reundant NOTE_PUSH.
(generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
(- case SWITCH_EXPR): Fix code generation bug.
(- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
(generate_classfile): More robust for abstract methods.
From-SVN: r23661
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r-- | gcc/java/decl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c index c6250759..24118b9 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -318,6 +318,7 @@ tree error_mark_node; The first is of type `int', the second of type `void *'. */ tree integer_zero_node; tree null_pointer_node; +tree empty_stmt_node; /* Nodes for boolean constants TRUE and FALSE. */ tree boolean_true_node, boolean_false_node; @@ -431,8 +432,6 @@ init_decl_processing () TREE_TYPE (size_zero_node) = sizetype; size_one_node = build_int_2 (1, 0); TREE_TYPE (size_one_node) = sizetype; - /* Used by the parser to represent empty statements and blocks. */ - CAN_COMPLETE_NORMALLY (size_zero_node) = 1; byte_type_node = make_signed_type (8); pushdecl (build_decl (TYPE_DECL, get_identifier ("byte"), byte_type_node)); @@ -475,6 +474,10 @@ init_decl_processing () null_pointer_node = build_int_2 (0, 0); TREE_TYPE (null_pointer_node) = ptr_type_node; + /* Used by the parser to represent empty statements and blocks. */ + empty_stmt_node = build1 (NOP_EXPR, void_type_node, size_zero_node); + CAN_COMPLETE_NORMALLY (empty_stmt_node) = 1; + #if 0 /* Make a type to be the domain of a few array types whose domains don't really matter. |