From cd9643f75b2f7bc41642bd988532a03ba923c3f4 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Wed, 5 May 1999 14:10:07 -0700 Subject: class.c (make_field_value): DECL_INITIAL may be a string literal... d * class.c (make_field_value): DECL_INITIAL may be a string literal; temporarily zero it while calling rest_of_decl_compilation. * java-tree.h (string_ptr_type_node): Add declaration. * decl.c: Define and initialize string_ptr_type_node. * parse.y (patch_string_cst): Use string_ptr_type_node. * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed. * parse.y (for_statement): Now unconditionally exit_block. (finish_labeled_statement): No longer exit_block if for-loop. (patch_loop_statement): Check harder if the loop is already labeled. * parse.y (patch_initialized_static_field): Removed function. (maybe_generate_clinit): Removed special handling for interfaces. (java_complete_expand_methods): Do a preliminary java_complete_tree on to determine if it can be removed. (java_complete_expand_method): Remove special handling for . (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION optimize if we get back empty_stmt_node. For MODIFY_EXPR, re-do checking of static initializers. (fold_constant_for_init): Don't return immediate if VAR_DECL. For VAR_DECL, pass correct context. From-SVN: r26790 --- gcc/java/decl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/java/decl.c') diff --git a/gcc/java/decl.c b/gcc/java/decl.c index a04c1c8..409df66 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -254,6 +254,7 @@ tree object_type_node; tree unqualified_object_id_node; tree object_ptr_type_node; tree string_type_node; +tree string_ptr_type_node; tree throwable_type_node; tree runtime_exception_type_node; tree error_exception_type_node; @@ -549,6 +550,7 @@ init_decl_processing () object_type_node = lookup_class (get_identifier ("java.lang.Object")); object_ptr_type_node = promote_type (object_type_node); string_type_node = lookup_class (get_identifier ("java.lang.String")); + string_ptr_type_node = promote_type (string_type_node); class_type_node = lookup_class (get_identifier ("java.lang.Class")); throwable_type_node = lookup_class (get_identifier ("java.lang.Throwable")); runtime_exception_type_node = -- cgit v1.1