aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/check-init.c
AgeCommit message (Collapse)AuthorFilesLines
2003-09-28c-decl.c (duplicate_decls): Copy DECL_SOURCE_LOCATION, not file and line ↵Richard Henderson1-4/+2
separately. * c-decl.c (duplicate_decls): Copy DECL_SOURCE_LOCATION, not file and line separately. f/ * com.c (duplicate_decls): Copy DECL_SOURCE_LOCATION, not file and line separately. java/ * check-init.c (check_init): Save and restore input_location instead of file and line separately. * decl.c (java_expand_body): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * parse.y (safe_layout_class): Likewise. * jcf-parse.c (read_class, parse_class_file): Likewise. (java_parse_file): Use %H for warning locator. From-SVN: r71886
2003-09-20c-format.c (gcc_diag_char_table): Add %J.Richard Henderson1-2/+2
* c-format.c (gcc_diag_char_table): Add %J. (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Likewise. (check_format_types): Fix wanted_type name lookup. (init_dynamic_diag_info): Setup %J. * diagnostic.c (text_specifies_location): Implement %J. * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, calls.c, dwarfout.c, expr.c, function.c, stmt.c, stor-layout.c, toplev.c, tree-inline.c, tree-optimize.c, varasm.c, config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c, config/v850/v850.c, objc/objc-act.c: Use %J in diagnostics. * tree-inline.c: Include intl.h (inline_forbidden_p_1): Fix i18n of inline_forbidden_reason. * Makefile.in (tree-inline.o): Update. cp/ * decl.c, decl2.c, pt.c: Use %J in diagnostics. java/ * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics. testsuite/ * gcc.dg/format/gcc_diag-1.c: Add tests for %J. From-SVN: r71619
2003-09-18tree.def (FFS_EXPR, [...]): Delete unused tree codes.Roger Sayle1-1/+0
* tree.def (FFS_EXPR, CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): Delete unused tree codes. * c-common.c (c_common_truthvalue_conversion): Delete references to FFS_EXPR and POPCOUNT_EXPR. * c-pretty-print.c (pp_c_postfix_expression): Remove FFS_EXPR. (pp_c_expression): Likewise. * expr.c (expand_expr): Delete RTL expansion of FFS_EXPR, CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR and PARITY_EXPR. * fold-const.c (tree_expr_nonnegative_p): Remove FFS_EXPR, CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR and PARITY_EXPR. Add support for calls to BUILT_IN_FFS, BUILT_IN_PARITY and BUILT_IN_POPCOUNT and their long and long long variants. * cp/lex.c (init_operators): Remove operator_name_info for FFS_EXPR. * cp/class.c (instantiate_type): Remove FFS_EXPR case. * f/com.c (ffecom_overlap_): Remove FFS_EXPR case. (ffecom_tree_canonize_ref_): Likewise. (ffe_truthvalue_conversion): Likewise. * java/expr.c (java_truthvalue_conversion): Remove FFS_EXPR case. * java/check-init.c (check_init): Likewise. From-SVN: r71525
2003-07-25objc-act.c (objc_check_decl): Don't use xxx_with_decl.Gabriel Dos Reis1-1/+2
* objc/objc-act.c (objc_check_decl): Don't use xxx_with_decl. (objc_declare_class): Likewise. (error_with_ivar): Likewise. (start_class): Likewise. (warn_with_method): Likewise. java/ * expr.c (expand_java_field_op): Don't use xxx_with_decl (expand_java_field_op): Likewise. * class.c (layout_class_method): Likewise (emit_register_classes): Likewise. * decl.c (pushdecl): Likewise. (poplevel): Likewise. (force_poplevels): Likewise. (give_name_to_locals): Likewise. * check-init.c (check_for_initialization): Likewise. From-SVN: r69780
2003-05-01input.h (lineno): Rename to ...Nathan Sidwell1-3/+3
* input.h (lineno): Rename to ... (input_line): ... here. * tree.h (lineno): Rename to ... (input_line): ... here. * scan.h (lineno): Rename to ... (input_line): ... here. * toplev.c (lineno): Rename to ... (input_line): ... here. (push_srcloc, pop_srcloc): Rename lineno to input_line. * c-common.c (c_expand_start_cond, fname_decl): Likewise. * c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag, store_parm_decls, c_expand_body_1): Likewise. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise. * c-opts.c (c_common_post_options, c_common_parse_file): Likewise. * c-parse.in (save_filename, maybe_type_qual, ifc): Likwise. * c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var, gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt, genrtl_return_stmt, genrtl_for_stmt, build_break_stmt, build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt, prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise. * coverage.c (create_coverage): Likewise. * diagnostic.c (pedwarn, sorry, error, fatal_error, internal_error, warning, diagnostic_report_current_module, inform): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function, output_inline_function): Likewise. * rtl-error.c (file_and_line_for_asm): Likewise. * tree-inline.c (find_alloca_call, find_builtin_longjmp_call, walk_tree): Likewise. * tree.c (make_node): Likewise. * ada, cp, f, java, objc, treelang: Likewise. ada * trans.c (build_unit_elab, set_lineno): Rename lineno to input_line. * utils.c (pushdecl, create_label_decl, begin_subprog_body, end_subprog_body): Likewise. * utils2.c (build_call_raise): Likewise. cp * class.c (finish_struct): Rename lineno to input_line. * decl.c (push_binding_level, pop_binding_level, suspend_binding_level, resume_binding_level, make_label_decl, use_label, start_function): Likewise. * decl2.c (warn_if_unknown_interface, start_static_initialization_or_destruction, generate_ctor_or_dtor_function, finish_file): Likewise. * error.c (cp_line_of, print_instantiation_full_context, print_instantiation_context): Likewise. * except.c (check_handlers_1, check_handlers): Likewise. * init.c (create_temporary_var): Likewise. * method.c (use_thunk, synthesize_method): Likewise. * parser.c (cp_lexer_set_source_position_from_token, cp_lexer_get_preprocessor_token): Likewise. * pt.c (push_tinst_level, pop_tinst_level, tsubst_friend_function, instantiate_class_template, tsubst_decl, tsubst, tsubst_expr, instantiate_decl): Likewise. * semantics.c (genrtl_try_block, finish_label_stmt, begin_class_definition, expand_body, genrtl_finish_function): Likewise. * tree.c (build_min_nt, build_min): Likewise. f * ansify.c (die_unless): Rename lineno to input_line. * com.c (ffecom_subscript_check_, ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_, bison_rule_pushlevel_, bison_rule_compstmt_, finish_function, store_parm_decls): Likewise. * intrin.c (ffeintrin_fulfill_generic): Likewise. * lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_, ffelex_file_fixed, ffelex_file_free): Likewise. * std.c (ffestd_exec_end): Likewise. * ste.c (ffeste_emit_line_note_, ffeste_start_block_, ffeste_start_stmt_): Likewise. * ste.h (ffeste_filelinenum, ffeste_set_line): Likewise. java * lex.h (lineno): Rename to ... (input_line): ... here * parse-scan.y (lineno): Rename to ... (input_line): ... here. (reset_report): Rename lineno to input_line. * check-init.c (check_init): Likewise. * class.c (push_class): Likewise. * decl.c (complete_start_java_method, end_java_method): Likewise. * expr.c (expand_byte_code): Likewise. * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lex.c (java_init_lex, java_allocate_new_line, do_java_lex): Likewise. * parse.h (YYNOT_TWICE): Likewise. * parse.y (empty_statement, expression_statement, java_pop_parser_context, java_parser_context_save_global, yyerror, register_fields, method_header, safe_layout_class, find_in_imports_on_demand, create_artificial_method, source_end_java_method, start_complete_expand_method, build_thisn_assign, java_complete_lhs, maybe_absorb_scoping_block): Likewise. objc * objc-act.c (objc_init): Rename lineno to input_line. (build_module_descriptor, build_selector_translation_table, build_protocol_template, build_method_prototype_list_template, build_category_template, build_selector_table, build_class_template, build_super_template, build_ivar_template, build_ivar_list_template, build_method_list_template, build_method_template, add_instance_variable): Likewise. treelang * tree1.c (treelang_init): Rename lineno to input_line. From-SVN: r66333
2003-01-18check-init.c: Fix comment typos.Kazu Hirata1-1/+1
* check-init.c: Fix comment typos. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-except.h: Likewise. * java-tree.h: Likewise. * javaop.h: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-write.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * typeck.c: Likewise. * verify.c: Likewise. From-SVN: r61477
2003-01-12* All Files: Convert to ISO C style function definitions.Kaveh R. Ghazi1-25/+11
From-SVN: r61218
2003-01-09* All Files: Remove PARAMS macro.Kaveh R. Ghazi1-8/+8
From-SVN: r61133
2003-01-01Make-lang.in, [...]: Replace "GNU CC" with "GCC" in the copyright header.Steven Bosscher1-4/+6
* Make-lang.in, boehm.c, buffer.c, buffer.h, builtins.c, class.c, config-lang.in, constants.c, convert.h, decl.c, except.c, expr.c, java-except.h, java-tree.h, javaop.def, jcf-parse.c, jcf-write.c, jv-scan.c, jvgenmain.c, jvspec.c, keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c, lex.c, lex.h, mangle.c, mangle_name.c, parse-scan.y, parse.h, parse.y, typeck.c, verify.c, xref.c, xref.h: Replace "GNU CC" with "GCC" in the copyright header. * check-init.c, gjavah.c, javaop.h, jcf-depend.c, jcf-dump.c, jcf-io.c, jcf-path.c, jcf-reader.c, jcf.h, zextract.c, zipfile.h: These files are "part of GCC". Also say "GCC" not "GNU CC". From-SVN: r60747
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-0/+2
From-SVN: r60174
2002-11-18buffer.c: Remove unnecessary casts.Jens-Michael Hoffmann1-1/+1
2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de> * buffer.c: Remove unnecessary casts. * check-init.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * gjavah.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-path.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * verify.c: Likewise. From-SVN: r59224
2002-06-04Merge from pch-branch up to tag pch-commit-20020603.Geoffrey Keating1-26/+4
From-SVN: r54232
2002-02-28expr.c (java_array_data_offset): Removed function.Bryce McKinlay1-1/+1
* expr.c (java_array_data_offset): Removed function. (JAVA_ARRAY_LENGTH_OFFSET): Removed macro. (build_java_array_length_access): Obtain "length" value using a COMPONENT_REF, instead of INDIRECT_REF and arithmetic. (build_java_arrayaccess): Correct comment. Access "data" using a COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF. (build_java_arraystore_check): New function. (expand_java_arraystore): Use build_java_arraystore_check. * parse.y (patch_assignment): Simplify code to insert a store check when lvalue is an ARRAY_REF. Use build_java_arraystore_check. * check-init.c (check_init): Update to reflect that an array length access is now a COMPONENT_REF. * gcj.texi (Code Generation): Improve documentation of -fno-bounds-check. Add documentation for -fno-store-check. * java-tree.h (flag_store_check): Declare. (build_java_arraystore_check): Declare. * lang.c (flag_store_check): Initialize to 1. (lang_f_options): Add store-check option. * jvspec.c: Don't pass store-check option to jvgenmain. * lang-options.h: Add help string for -fno-store-check. From-SVN: r50129
2001-12-11* check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.Tom Tromey1-13/+3
From-SVN: r47860
2001-12-09check-init.c (current_switch_has_default): New static field.Per Bothner1-1/+13
* check-init.c (current_switch_has_default): New static field. (check_init): Case DEFAULT_EXPR: Set current_switch_has_default. Case SWITCH_EXPR: Save/restore current_switch_has_default. If no DEFAULT_EXPR seen, simulate a default alternative that copies state. From-SVN: r47833
2001-12-09check-init.c (check_init): Don't allow pre- or post- increment or decrement ↵Tom Tromey1-5/+13
of final variable. * check-init.c (check_init): Don't allow pre- or post- increment or decrement of final variable. (final_assign_error): Minor error message rewording. From-SVN: r47821
2001-12-07* check-init.c (check_init): Fix typo freeing memory twice.Per Bothner1-2/+0
From-SVN: r47763
2001-12-06Restore support for static class initialization optimization.Per Bothner1-8/+19
From-SVN: r47735
2001-12-04check-init.c: Handle definite unassignment to finals in addition to definite ↵Per Bothner1-82/+334
assignment. * check-init.c: Handle definite unassignment to finals in addition to definite assignment. [see ChangeLog] From-SVN: r47619
2001-12-03decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR instead ↵Per Bothner1-23/+0
of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR. * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR. * jcf-write.c (generate_bytecode_insns): Remove support for CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used. * check-init.c (check_init): Likewise. From-SVN: r47587
2001-08-08check-init.c (flags.h): IncludeAlexandre Petit-Bianco1-4/+40
2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com> * check-init.c (flags.h): Include (check_init): Don't report uninitialized static class initialization flags, don't free bit index when doing static class initialization optimization. (check_for_initialization): Return type changed to `unsigned int.' (attach_initialized_static_class): New function. * class.c (add_method_1): Create the initialized static class table if necessary. (finish_class): Always emit deferred inline methods. * decl.c (emit_init_test_initialization): Moved to expr.c (complete_start_java_method): Don't traverse DECL_FUNCTION_INIT_TEST_TABLE. (lang_mark_tree): Mark hash tables in function decls. * expr.c (emit_init_test_initialization): Moved from decl.c. (build_class_init): Create LAG_DECL_SPECIFIC for the static class initialization flag, set DECL_CONTEXT and LOCAL_CLASS_INITIALIZATION_FLAG. (java_lang_expand_expr): Emit initialization code for static class initialized flags when entering block, if necessary. * gcj.texi (-fno-optimize-static-class-initialization): Documented. * java-tree.h (flag_optimize_sci): New global variable declaration. (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro. (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise. (LOCAL_FINAL_P): Fixed typo in comment. (FINAL_VARIABLE_P): Likewise. (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro. (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise. (struct lang_decl): New fields `ict', `smic' and `cif.' (check_for_initialization): New returned value for global. (attach_initialized_static_class): New global function. (STATIC_CLASS_INIT_OPT_P): New macro. * lang-options.h (-fno-optimize-static-class-initialization): New flag. * lang.c (java_decode_option): Handle `-fno-optimize-static-class-initialization' * parse.y (start_complete_expand_method): New function. (java_expand_method_bodies): Likewise. (attach_init_test_initialization_flags): Likewise. (adjust_init_test_initialization): Likewise. (emit_test_initialization): Likewise. (java_complete_expand_methods): Nullify abstract and native method bodies. (java_complete_expand_method): New locals `fbody', `block_body' and `exception_copy.' Reorganized: directly return on empty method bodies, call `start_complete_expand_method', remember definitely initialized static class in function, don't expand method bodies. (java_expand_classes): Call `java_expand_method_bodies' before `finish_class' when compiling to native. (resolve_expression_name): Use `orig' after building outer class field access. (patch_invoke): Remember static method invokations. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg00454.html) From-SVN: r44733
2001-07-31*** empty log message ***Alexandre Petit-Bianco1-1/+1
From-SVN: r44528
2001-07-14* tree.def (EXPON_EXPR) remove. Never supported anyway.Tim Josling1-1/+0
* f/com.c (ffecom_overlap_): Remove references to EXPON_EXPR. (ffecom_tree_canonize_ref_): Likewise. * java/check-init.c (check_init): Remove references to EXPON_EXPR. From-SVN: r44011
2001-05-12java-tree.def (JAVA_EXC_OBJ_EXPR): New.Richard Henderson1-1/+1
* java-tree.def (JAVA_EXC_OBJ_EXPR): New. * expr.c (java_lang_expand_expr): Expand it. (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of calling build_exception_object_ref. * parse.y (catch_clause_parameter): Likewise. (build_dot_class_method): Likewise. (try_reference_assignconv): Likewise. * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR. * jcf-write.c (generate_bytecode_insns): Likewise. From-SVN: r42030
2001-03-28IA-64 ABI Exception Handling.Richard Henderson1-0/+1
From-SVN: r40924
2001-03-28java-tree.h (throw_node): Define as a single member of java_global_trees ↵Richard Henderson1-2/+1
instead of a separate array. * java-tree.h (throw_node): Define as a single member of java_global_trees instead of a separate array. (JTI_THROW_NODE): New. * decl.c (throw_node): Don't declare. (init_decl_processing): Init a scalar throw_node. Don't register it for gc. * check-init.c (check_init): Reference scalar throw_node. * expr.c (build_java_athrow): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * parse.h (BUILD_THROW): Likewise. From-SVN: r40922
2001-02-07check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.Per Bothner1-3/+3
* check-init.c (check_init): Fix TRY_FINALLY_EXPR logic. * check-init.c (check_init): Don't call done_alternative after processing loop code, as a LOOP_EXPR never terminates normally. From-SVN: r39534
2001-02-04diagnostic.h (set_internal_error_function): Renamed.Richard Kenner1-6/+6
* diagnostic.h (set_internal_error_function): Renamed. * toplev.h (internal_error): Renamed from fatal. (pfatal_with_name): Deleted. (fatal_io_error): Now has printf-style arguments. * diagnostic.c (pfatal_with_name): Deleted. (fatal_io_error): Rework to have args in printf-style. (set_internal_error_function): Renamed from set_fatal_function. (internal_error): Renamed from fatal. (error_recursion, fancy_abort): Call internal_error instead of fatal. * dwarf2out.c (get_cfa_from_loc_descr): Likewise. * emit-rtl.c (gen_realpart, gen_imagpart): Likewise. * expr.c (check_max_integer_computation_mode, expand_expr): Likewise. * flow.c (verify_flow_info): Likewise. * config/arm/arm.c (thumb_unexpanded_epilogue): Likewise. * config/mips/mips.c (save_restore_insns): Likewise. * cp/init.c (build_java_class_ref): Likewise. (dsp16xx_reg_class_from_letter): Likewise. (limit_reload_class, double_reg_to_memory): Likewise. (print_operand_address, emit_1600_code_shift): Likewise. (gen_tst_reg, gen_compare_reg): Likewise. * config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise. * cp/decl.c (pushdecl): Likewise. * java/check-init.c (check_init): Likewise. * java/expr.c (java_lang_expand_expr): Likewise. * java/jcf-parse.c (get_constant): Likewise. * java/mangle.c (java_mangle_decl): Likewise. * java/parse.y (make_nested_class_name, java_complete_lhs): Likewise. (operator_string): Likewise. * except.c (duplicate_eh_handlers): Call abort instead of fatal. * flow.c (verify_flow_info): Likewise. * ch/convert.c (convert): Likewise. * ch/except.c (pop_handler, chill_check_no_handlers): Likewise. * ch/expr.c (chill_expand_expr): Likewise. * ch/parse.c (peek_token_, pushback_token, require): Likewise. * config/arm/arm.c (thumb_load_double_from_address): Likewise. * config/avr/avr.c (pttreg_to_str, unique_section): Likewise. (avr_normalize_condition): Likewise. * config/c4x/c4x.c (c4x_emit_libcall, c4x_valid_operands): Likewise. * config/dsp16xx/dsp16xx.c (dsp16xx_reg_class_from_letter): Likewise. (limit_reload_class, double_reg_to_memory): Likewise. (print_operand_address, emit_1600_code_shift): Likewise. (gen_tst_reg, gen_compare_reg): Likewise. * config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise. * cp/decl.c (pushdecl): Likewise. * java/check-init.c (check_init): Likewise. * java/class.c (build_class_ref): Likewise. * java/constants.c (write_constant_pool): Likewise. * java/decl.c (start_java_method): Likewise. * java/expr.c (push_type, java_stack_pop, java_stack_swap): Likewise. (java_stack_dup, encode_newarray_type): Likewise. (build_java_array_length_access): Likewise. (build_java_check_indexed_type, expand_java_pushc): Likewise. (build_java_soft_divmod, build_invokeinterface): Likewise. * java/java-tree.h (INNER_CLASS_P): Likewise. * java/jcf-parse.c (parse_signature, get_name_constant): Likewise. (give_name_to_class, get_class_constant): Likewise. * java/jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise. (find_constant_index, generate_bytecode_conditional): Likewise. (generate_bytecode_insns, perform_relocations): Likewise. * java/lex.c (java_unget_unicode, java_lex): Likewise. * java/mangle.c (mangle_type, mangle_record_type): Likewise. (mangle_pointer_type, mangle_array_type, init_mangling): Likewise. (finish_mangling): Likewise. * java/parse.h (MARK_FINAL_PARMS): Likewise. * java/parse.y (pop_current_osb, unreachable_stmt_error): Likewise. (obtain_incomplete_type, java_complete_class): Likewise. (java_check_regular_methods, java_complete_expand_method): Likewise. (cut_identifier_in_qualified, check_deprecation): Likewise. (patch_invoke, find_applicable_accessible_methods_list): Likewise. (java_complete_lhs, lookup_name_in_blocks): Likewise. (check_final_variable_indirect_assignment, build_unaryop): Likewise. * java/typeck.c (set_local_type, parse_signature_type): Likewise. (parse_signature_string, build_java_signature): Likewise; (set_java_signature): Likewise. * java/verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise. * c-parse.in (methoddef): Call fatal_error instead of fatal. * objc/objc-act.c (build_ivar_chain): Likewise. * cp/except.c (decl_is_java_type): Likewise. * cp/init.c (build_java_class_ref): Likewise. * cp/init.c (build_new_1): Likewise. * f/com.c (ffecom_init_0): Likewise. * java/class.c (add_method, build_static_field_ref): Likewise. * java/expr.c (build_known_method_ref, expand_invoke): Likewise. * java/jcf-parse.c (get_constant, jcf_parse): Likewise. * java/lex.c (java_new_new_lexer): Likewise. * java/jv-scan.c (main): Likewise. (fatal_error): Renamed from fatal. * dwarfout.c (dwarfout_init): Call fatal_io_error instead of pfatal_with_name. * graph.c (clean_graph_dump_file): Likewise. * profile.c (init_branch_prob): Likewise. * ch/grant.c (write_grant_file): Likewise. * ch/lex.c (init_parse, same_file, yywrap): Likewise. * f/com.c (init_parse): Likewise. * java/jcf-parse.c (yyparse): Likewise. * objc/objc-act.c (objc_init): Likewise. * java/jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal. (yyparse): Likewise. * java/jcf-write.c (make_class_file_name, write_classfile): Likewise. * java/lex.c (java_get_line_col): Likewise. * hash.c (hash_allocate): Don't check for failure returns from obstack functions that can't fail. (hash_table_init_n, hash_table_init): Likewise; also now return void. * hash.h (hash_table_init_n, hash_table_init): Now return void. * cp/decl.c (build_typename_type): hash_table_init now returns void. * ch/lang.c (GNU_xref_begin, GNU_xref_end): Deleted. * ch/lex.c (convert_bitstring): Delete check for alloca failure. * config/dsp16xx/dsp16xx.c (dsp16xx_invalid_register_for_compare): Deleted. * config/dsp16xx/dsp16xx.md (unnamed cmphi): Call abort instead of it. * f/com.c (ffecom_decode_include_option_): Make errors non-fatal. * f/lex.c (ffelex_cfelex_, ffelex_get_directive_line_): Likewise. (ffelex_hash_): Likewise. * config/arm/arm.c (arm_override_options): Likewise. * config/avr/avr.c (avr_override_options): Likewise. * config/c4x/c4x.c (c4x_expand_prologue): Likewise. * config/dsp16xx/dsp16xx.c (function_prologue): Likewise. * config/h8300/h8300.c (h8300_init_once): Likewise. * config/mips/mips.c (override_options): Likewise. * config/i386/i386.c (override_options): Likewise, rework. * config/m68k/m68k.c (override_options): Likewise. * cp/decl.c (init_decl_processing): Likewise. * java/jcf-parse.c (load_class): Likewise. * config/dsp16xx/dsp16xx.c (print_operand): Call output_operand_lossage instead of fatal. * config/mips/mips.c (print_operand): Likewise. * java/lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV. * objc/objc_act.c (objc_check_decl): Remove unneeded fatal call. (get_object_reference): Likewise. From-SVN: r39443
2000-12-06[multiple changes]Alexandre Petit-Bianco1-4/+3
2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (OP1): Update `last_bc'. (struct jcf_block): Fixed indentation and typo in comments. New field `last_bc'. (generate_bytecode_insns): Insert `nop' if `jsr' immediately follows `monitorenter'. * parse.y (patch_synchronized_statement): New local `tmp'. Call `patch_string'. Fixes gcj/232. 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Fixed leading comment. Use LOCAL_FINAL_P. * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. (give_name_to_locals): Likewise. (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl' fields in lang_decl_var. * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR, DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros. (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten. (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC, DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros. (LOCAL_FINAL): Rewritten. (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros. (struct lang_decl): Fixed comments. Added `synthetic_ctor' and `init_final' fields. (struct lang_decl_var): Fixed leading comment. Added `am', `wfl', `final_uid', `final_liic', `final_ierr' and `local_final' fields. (TYPE_HAS_FINAL_VARIABLE): New macro. (struct lang_type): Added `afv' field. * parse.y (check_static_final_variable_assignment_flag): New function. (reset_static_final_variable_assignment_flag): Likewise. (check_final_variable_local_assignment_flag): Likewise. (reset_final_variable_local_assignment_flag): Likewise. (check_final_variable_indirect_assignment): Likewise. (check_final_variable_global_assignment_flag): Likewise. (add_inner_class_fields): Use LOCAL_FINAL_P. (register_fields): Handle local finals and final variables. (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR. (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC on local finals. (java_complete_expand_methods): Loop to set TYPE_HAS_FINAL_VARIABLE. Call `reset_final_variable_local_assignment_flag' and `check_final_variable_local_assignment_flag' accordingly before and after constructor expansion. Call `reset_static_final_variable_assignment_flag' before expanding <clinit> and after call `check_static_final_variable_assignment_flag' if the current_class isn't an interface. After all methods have been expanded, call `check_final_variable_global_assignment_flag' and `check_static_final_variable_assignment_flag' if the current class is an interface. (maybe_yank_clinit): Fixed typo in comment. (build_outer_field_access_methods): Removed old sanity check. Use FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. Don't create access methods for finals. (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'. (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if existing DECL_INIT has been processed. (java_complete_lhs): Likewise. (check_final_assignment): Filter input on `lvalue''s TREE_CODE. Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new logic. (patch_assignment): Use LOCAL_FINAL_P. (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if DECL_INITIAL is nullified. Fixes gcj/163. 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (pop_current_osb): New function. (array_type:): Use `dims:', changed actions accordingly. Suggested by Anthony Green. (array_creation_expression:): Used pop_current_osb. (cast_expression:): Likewise. (search_applicable_method_list): Fixed indentation. 2000-10-08 Anthony Green <green@redhat.com> * parse.y (array_type_literal): Remove production. (type_literals): Refer to array_type, not array_type_literal. (http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00317.html) From-SVN: r38070
2000-08-13check-init.c (check_init): Add case for BIT_FIELD_REF (required for -pg builds).Anthony Green1-0/+1
* check-init.c (check_init): Add case for BIT_FIELD_REF (required for -pg builds). From-SVN: r35661
2000-06-21[multiple changes]Alexandre Petit-Bianco1-2/+2
2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com> * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'. 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for Java specific checks. * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage screened by DECL_P. * java-tree.def (CASE_EXPR): Marked 'e'. (DEFAULT_EXPR): Likewise. * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage screened by DECL_P. * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for Java specific checks. (generate_bytecode_insns): Test try_block for BLOCK before using BLOCK_EXPR_BODY. * parse.y (build_wfl_wrap): Added `location' argument. Set EXPR_WFL_LINECOL accordingly. (dim_expr:): Wrap constants with WFLs. (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC. (resolve_package): Check for `stmt' not being a BLOCK before building a debuggable statement with it. (make_qualified_primary): Added extra parameter to build_wfl_wrap invocation. (resolve_field_access): Make sure `decl' is a DECL before treating it as such. (maybe_build_primttype_type_ref): Make sure `wfl''s node is an IDENTIFIER_NODE before treating it as such. (patch_new_array_init): Make sure `elt' is a TREE_LIST before treating it as such. (find_applicable_accessible_methods_list): CLASS_INTERFACE macro to be applied only on non array types. 2000-06-16 Per Bothner <per@bothner.com> * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't define in terms of DECL_RESULT, as that fails when --enable-checking. 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries. * parse.y (find_in_imports): Returned type changed to void, leading comment fixed. (register_package): New function. (qualify_and_find): Likewise. (package_declaration:): Use `register_package'. (single_type_import_declaration:): Removed local variable `node'. Added missing `;' for consistency. (type_import_on_demand_declaration:): Use `chainon' to link new entries. (lookup_field_wrapper): Lookup local variables defined in outer contexts first. (java_complete_class): Don't reverse the list of imported on demand. (do_resolve_class): Reorganized. Removed local variable `original_name'. Call `qualify_and_find' with the current package name, invoke `find_in_imports_on_demand' right after. Call `qualify_and_find' with the packages we've seen so far. Fixed operations numbering in comments. (java_expand_class): Don't reverse `package_list'. (find_most_specific_methods_list): New local variables `abstract' and `candidates'. Use them to pick the right method. (Fixes for the ENABLE_TREE_CHECKING Java run-time build problem: http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00551.html) From-SVN: r34642
2000-05-09top level:Zack Weinberg1-1/+1
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings. (tree.o): Depend on output.h. * c-decl.c (pending_invalid_xref_file, current_function_prototype_file): Constify. (pushdecl): Constify a local char *. (define_label): Constify filename parameter. * c-lex.c (init_parse): Constify parameter and return value. * c-typeck.c (c_expand_asm_operands): Constify filename parameter. * c-tree.h: Update prototypes. * c-parse.in: Constify filename member of %union, and if_stmt_file. * c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y, objc/objc-parse.c: Regenerate. * dwarfout.c (dwarfout_init): Constify main_input_filename parameter. * dwarfout.h: Update prototypes. * expr.c (expand_expr): Constify a local char *. * flags.h: Constify main_input_filename. * function.c (expand_function_end): Constify filename parameter. * genrecog.c (make_insn_sequence): Use a character array for c_test_pos. (main): Remove unused variables. * input.h: Constify input_filename, main_input_filename, and file_stack.name. Update prototypes. * output.h: Declare first_global_object_name and weak_global_object_name here, as const char *. * stmt.c (expand_asm_operands): Constify filename parameter. * toplev.c (compile_file, push_srcloc, debug_start_source_file): Constify filename parameter. (input_filename, main_input_filename): Constify. * toplev.h: Update prototypes. * tree.c: Include output.h. Don't declare first_global_object_name or weak_global_object_name. Clean up string bashing in get_file_function_name_long. * tree.h (struct tree_decl): Constify filename member. (input_filename): Constify. Update prototypes. * varasm.c (first_global_object_name, weak_global_object_name): Constify. (assemble_start_function, assemble_variable): Clean up string bashing. * gcc.c: Constify all spec-related strings initialized, transitively, from string constants. Constify all strings and string variables related to multilibs. (set_spec, read_specs): Cast argument to free to PTR. (used_arg): Do not modify multilib_matches. Use strncmp plus length comparison to compare multilib switches. * genmultilib: Constify everything declared in multilib.h. ch: * ch-tree.h: Update prototypes. Remove prototypes for functions declared elsewhere. * decl.c (define_label): Constify filename parameter. * grant.c (globalize_decl, set_default_grant_file): Constify local char * variables. Don't declare first_global_object_name or asm_out_file. * lang.c (chill_real_input_filename): Constify. * lex.c (init_parse): Constify parameter and return value. * parse.c: Don't declare input_filename. (ch_expand_asm_operands): Constify filename parameter. (parse_multi_dimension_case_action): Constify local char *. * satisfy.c (safe_satisfy_decl): Constify local char *. cp: * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, and pending_inline.filename. Update prototypes. * decl.c (define_label): Constify filename parameter. * decl2.c (warn_if_unknown_interface): Constify local char *. * input.c Constify input_source.filename. Don't declare input_filename or lineno. Constify filename parameter to feed_input. * lex.c (init_parse): Constify parameter and return value. (cp_pragma_interface, cp_pragma_implementation): Constify filename argument. (reinit_parse_for_method, reinit_parse_for_block, reinit_parse_for_expr, feed_defarg, handle_cp_pragma): Constify local char *. * pt.c: Don't declare lineno or input_filename. (print_template_context, tsubst_friend_function, tsubst_decl, tsubst, instantiate_decl): Constify local char *. * semantics.c (expand_body): Constify local char *. * tree.c (build_srcloc): Constify filename parameter. * typeck.c (c_expand_asm_operands): Constify filename parameter. f: * com.c (ffecom_subscript_check_): Constify array_name parameter. Clean up string bashing. (ffecom_arrayref_, ffecom_char_args_x_): Constify array_name parameter. (ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify local char *. (init_parse): Constify parameter and return value. * lex.c: Include dwarfout.h instead of prototyping dwarfout_* functions here. (ffelex_file_pop_, ffelex_file_push_): Constify filename parameter. (ffelex_hash_, ffelex_include_): Constify local char *. * std.c (ffestd_exec_end): Constify local char *. * where.c (ffewhere_file_new): Constify filename parameter. * where.h: Update prototypes. java: * check_init.c (check_init): Constify local char *. * class.c (push_class): Constify local char *. * java_tree.h: Update prototypes. * jcf-io.c (open_class): Constify filename parameter and return value. (find_class): Remove redundant string copy. Cast return from open_class. * jcf-parse.c (read_class, parse_class_file, yyparse): Constify local char *. * jcf-write.c (generate_bytecode_insns, generate_classfile): Constify local char *. * jcf.h (JCF): Constify filename and classname. (JCF_FINISH): Cast args to FREE to char * when appropriate. * lang.c (init_parse): Constify parameter and return value. * lex.c (java_get_line_col): Constify filename parameter. * parse.h: Constify parser_ctxt.filename. Update prototypes. * parse.y (java_parser_context_suspend, issue_warning_error_from_context, safe_layout_class): Constify local char *. * parse.c: Regenerate. From-SVN: r33804
2000-03-14check-init.c (check_init): Add new cases for unary and binary tree nodes.Andrew Haley1-0/+15
2000-02-14 Andrew Haley <aph@cygnus.com> * check-init.c (check_init): Add new cases for unary and binary tree nodes. From-SVN: r32543
2000-03-13Added Java 1.1 language features.Alexandre Petit-Bianco1-8/+13
From-SVN: r32517
2000-03-07re GNATS gcj/108 (Compiler doesn't check access modifiers on interface ↵Alexandre Petit-Bianco1-1/+7
implementations) 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (IS_INIT_CHECKED): New flag. * check-init.c (check_init): Test and set IS_INIT_CHECKED. * parse.y (patch_string): Call force_evaluation_order on the completed string concatenation tree. * expr.c (force_evaluation_order): Call force_evaluation_order on function's arguments too. (This fixes the Java PR #108: http://sourceware.cygnus.com/ml/java-prs/1999-q4/msg00174.html) From-SVN: r32391
2000-02-26expr.c (build_class_init): Mark the decl to be ignored by check_init.Anthony Green1-5/+0
2000-02-25 Anthony Green <green@cygnus.com> * expr.c (build_class_init): Mark the decl to be ignored by check_init. * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c * check-init.c: Move DECL_BIT_INDEX to java-tree.h * class.c (init_test_hash_newfunc): New function. (decl_hash): New function. (decl_compare): New function. * decl.c (emit_init_test_initialization): New function. (complete_start_java_method): Traverse the init test hashtable, calling emit_init_test_initialization. (always_initialize_class_p): Define. * expr.c (build_class_init): Use initialization tests when emitting class initialization code. (always_initialize_class_p): Declare. * jcf-parse.c (parse_class_file): Set always_initialize_class_p to 1. * java-tree.h: Include hash.h. (DECL_FUNCTION_INIT_TEST_TABLE): Define. (struct lang_decl): Add init_test_table field. (init_test_hash_entry): Define. From-SVN: r32166
2000-01-21buffer.h: PROTO -> PARAMS.Kaveh R. Ghazi1-6/+6
* buffer.h: PROTO -> PARAMS. * check-init.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * convert.h: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * gjavah.c: Likewise. * java-except.h: Likewise. * java-tree.h: Likewise. * jcf-depend.c: Likewise. * jcf-dump.c: Likewise. * jcf-parse.c: Likewise. * jcf-path.c: Likewise. * jcf-reader.c: Likewise. * jcf-write.c: Likewise. * jcf.h: Likewise. * jv-scan.c: Likewise. * jvgenmain.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * lex.h: Likewise. * parse-scan.y: Likewise. * parse.h: Likewise. * parse.y: Likewise. * typeck.c: Likewise. * verify.c: Likewise. * xref.c: Likewise. * xref.h: Likewise. * zextract.c: Likewise. * zipfile.h: Likewise. From-SVN: r31550
1999-12-12check-init.c (check_init): Take into account both types of `throw's when ↵Anthony Green1-1/+2
checking for uninitialized variables. 1999-12-15 Anthony Green <green@cygnus.com> * check-init.c (check_init): Take into account both types of `throw's when checking for uninitialized variables. From-SVN: r30879
1999-10-30* check-init.c: Fix typo in comment.Todd T. Fries1-1/+1
From-SVN: r30281
1999-08-10check-init.c (check_bool2_init, [...]): Add static prototypes.Kaveh R. Ghazi1-0/+3
* check-init.c (check_bool2_init, done_alternative): Add static prototypes. * class.c (add_interface_do, maybe_layout_super_class): Likewise. (add_method, build_utf8_ref, build_class_ref, append_gpp_mangled_type, layout_class_method): Constify a char*. * decl.c (push_promoted_type, make_binding_level): Add static prototypes. (push_promoted_type, pushdecl): Constify a char*. * except.c (find_handler_in_range, link_handler, check_start_handlers): Add static prototypes. * expr.c (process_jvm_instruction): Constify a char*. * gjavah.c (main): Constify a char*. * java-tree.h (verify_jvm_instructions, process_jvm_instruction): Constify a char*. * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add static prototypes. (add_entry, jcf_dependency_set_target, jcf_dependency_add_target, munge, print_ents): Constify a char*. * jcf-dump.c (disassemble_method): Constify a char*. (print_constant_pool, print_exception_table): Add static prototypes. (print_constant, print_exception_table, main, disassemble_method): Constify a char*. * jcf-io.c (find_classfile, find_class): Likewise. * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise. (set_source_filename, predefined_filename_p): Add static prototypes. (set_source_filename, get_constant, get_class_constant, find_in_current_zip): Constify a char*. * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add static prototypes. (add_entry, add_path, jcf_path_classpath_arg, jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*. * jcf-reader.c (get_attribute, jcf_parse_preamble, jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields, jcf_parse_one_method, jcf_parse_methods, jcf_parse_final_attributes): Add static prototypes. (get_attribute): Constify a char*. * jcf.h (find_class, find_classfile, jcf_dependency_set_target, jcf_dependency_add_target, jcf_path_classpath_arg, jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*. * jv-scan.c (main): Constify a char*. (gcc_obstack_init): Add prototype arguments. * jvgenmain.c (gcc_obstack_init): Likewise. (main): Constify a char*. * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add static prototypes. (put_decl_string, lang_print_error): Constify a char*. (lang_init): Remove redundant extern prototype. * mangle.c (emit_unicode_mangled_name): Constify a char*. * typeck.c (convert_ieee_real_to_integer, parse_signature_type): Add static prototypes. (get_type_from_signature): Constify a char*. * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ): Add static prototypes. (start_pc_cmp): Prefer PTR over GENERIC_PTR. (verify_jvm_instructions): Constify a char*. * xref.c (xref_flag_value): Likewise. * xref.h (xref_flag_value): Likewise. * zextract.c (makeword, makelong): Add static prototypes. (makeword, makelong): Constify a uch*. From-SVN: r28648
1999-07-22re GNATS gcj/14 (Conditional expression in method call doesn't compile)Alexandre Petit-Bianco1-0/+1
Thu Jul 22 12:41:12 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Handle MAX_EXPR. (Fix to net PR #14.) From-SVN: r28220
1999-07-07[multiple changes]Alexandre Petit-Bianco1-0/+1
Sat Jul 3 22:26:32 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed CALL_EXPR, to avoid order of evaluation changes. Fri Jul 2 17:44:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (qualify_ambiguous_name): Do not use IDENTIFIER_LOCAL_VALUE when name is a STRING_CST. Thu Jul 1 23:31:16 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Handle MAX_EXPR. * expr.c (force_evaluation_order): Force method call arguments to be evaluated in left-to-right order. * parse.y (qualify_ambiguous_name): Loop again to qualify NEW_ARRAY_EXPR properly. Wed Jun 30 17:27:58 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_invoke): Resolve unresolved invoked method returned type. (qualify_ambiguous_name): STRING_CST to qualify expression for type name resolution. From-SVN: r27998
1999-05-14[multiple changes]Alexandre Petit-Bianco1-1/+2
Fri May 14 12:31:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * xref.c (xref_set_current_fp): New function, defined. * xref.h (xref_set_current_fp): New function, prototyped. Fri May 14 11:57:54 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Take into account that LABELED_BLOCK_STMT can be empty. From-SVN: r26935
1999-05-13check-init.c (check_init): Removed code accepting to see things falling ↵Alexandre Petit-Bianco1-3/+0
through default:, when doing xrefs. Thu May 13 13:23:38 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Removed code accepting to see things falling through default:, when doing xrefs. * java-tree.h (do_not_fold): New global variable, declared. * parse.y (do_not_fold): New global variable, defined. (java_complete_expand_method): Set `do_not_fold' to the value of `flag_emit_xref'. When doing xrefs: copy the thrown exceptions, and reinstall them after them have been purged; do not check for initializations; do not issue missing return errors. (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes when doing xrefs. (patch_binop): Skip the fold part when doing xrefs. (build_string_concatenation): Skip the concatenation part when doing xrefs. (patch_synchronized_statement): Do not generate a try-finally when doing xrefs. (patch_throw_statement): When doing xrefs, do not call BUILD_THROW and keep the location where the throw was seen. * typeck.c (convert): When `do_not_fold' is set, do not attempt any treatment on the converted node an simply return a NOP_EXPR of the targeted type. * xref.c (xref_get_data): New function, defined. * xref.h (xref_get_data): New function, declared. (XREF_GET_DATA): Use xref_get_data. From-SVN: r26926
1999-05-03check-init.c (check_init): Exclude a case of error when doing xrefs.Alexandre Petit-Bianco1-0/+3
Fri Apr 30 17:54:40 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Exclude a case of error when doing xrefs. * class.c (layout_class_method): Don't generate the error message twice when compiling from source. * lang-options.h: Added `-Wredundant-modifers' and `-Wunusupported-jdk11' flags and help text. * lang.c (lang_decode_option): Added support for `-Wunsupported-jdk11' and `-Wredundant-modifiers'. flag_static_local_jdk11 and flag_redundant set accordingly. * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK. * parse.h (EXPR_WFL_ADD_COL): New macro. (DECL_END_SOURCE_LINE): Likewise. (DECL_INHERITED_SOURCE_LINE): Likewise. * parse.y (static_ref_err): New function, prototyped. (CCB_TK): Now tagged <operator>. (class_body:): Remember the location of the closing '}' of a class definition when doing xrefs. (block:): Likewise. (block_end:): Likewise. (create_class): Remember the location of the inherited class identifier when doing xrefs. (register_fields): Added test on first operand of `init' before testing it TREE_CODE. (method_header): Store the location of the class identifier in the class decl when doing xrefs. (finish_method_declaration): Don't combine first/last method line when doing xref. (java_check_regular_methods): Warning check on not overriding methods with default access on other packages move before check on static methods. Initialization of `aflags' also moved up. (resolve_expression_name): Call static_ref_err to report the error. (static_ref_err): New function, implemented. (resolve_field_access): Returned simplified static field access when doing xrefs. (resolve_qualified_expression_name): Check for illegal use of static fields in a non static context. Call static_ref_err to report error in various places. (java_complete_tree): To not fold initialized static fields when doing xrefs. (java_complete_lhs): Likewise. From-SVN: r26758
1999-03-21Makefile.in (jcf-dump.o): Depend on $(CONFIG_H) $(srcdir)/../system.h and ↵Kaveh R. Ghazi1-1/+2
$(JAVA_TREE_H). * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H) $(srcdir)/../system.h and $(JAVA_TREE_H). (jcf-io.o): Depend on $(JAVA_TREE_H). (mangle.o): Likewise. * check-init.c (check_cond_init): Add static prototype. * class.c (build_java_method_type, hashUtf8String, make_field_value, get_dispatch_vector, get_dispatch_table, append_gpp_mangled_type, mangle_static_field): Likewise. (strLengthUtf8): Hide unused definition. (hashUtf8String): Const-ify. (make_field_value): Un-ANSI-fy. * constants.c: Move inclusion of jcf.h above java-tree.h. (set_constant_entry, find_class_or_string_constant, find_name_and_type_constant, get_tag_node, build_constant_data_ref): Add static prototype. * decl.c (push_jvm_slot, builtin_function, lookup_name_current_level): Likewise. (builtin_function): Const-ify. * except.c (expand_start_java_handler, expand_end_java_handler): Add static prototype. * expr.c (flush_quick_stack, push_value, pop_value, java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr, build_java_ret, expand_java_multianewarray, expand_java_arraystore, expand_java_arrayload, expand_java_array_length, build_java_monitor, expand_java_pushc, expand_java_return, expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label, expand_compare, expand_test, expand_cond, expand_java_goto, expand_java_call, expand_java_ret, pop_arguments, expand_invoke, expand_java_field_op, java_push_constant_from_pool): Likewise. (decode_newarray_type, expand_iinc): Un-ANSI-fy. (build_java_arraynull_check): Mark parameters `node' and `type' with ATTRIBUTE_UNUSED. (note_label): Likewise for parameter `current_pc'. (expand_java_call, expand_java_ret): Hide unused definition. * java-tree.h (make_class, build_constants_constructor, java_set_exception_lang_code, pop_labeled_block, emit_handlers, init_outgoing_cpool, register_class, emit_register_classes, java_layout_seen_class_methods): Prototype. (unicode_mangling_length): Const-ify. (append_gpp_mangled_name, append_gpp_mangled_classtype, emit_unicode_mangled_name, format_int, format_uint, jcf_trim_old_input, jcf_print_utf8, jcf_print_char, jcf_print_utf8_replace, open_class): Prototype. * jcf-dump.c: Include "config.h", not <config.h>. Don't include <stdio.h>. Include tree.h/java-tree.h. (utf8_equal_string usage, process_class): Add static prototype. (open_class): Don't prototype this here. (utf8_equal_string): Match arguments to format specifiers. (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH, TABLE_SWITCH, disassemble_method): Likewise. * jcf-io.c: Include tree.h/java-tree.h. (open_class, find_classfile, jcf_print_utf8, jcf_print_utf8_replace): Const-ify. * jcf-parse.c (parse_zip_file_entries, process_zip_dir, parse_class_file): Add static prototype. (find_in_current_zip): Match definition to existing static prototype. * jcf-write.c: Include jcf.h before tree.h/java-tree.h. (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label, finish_jcf_block, define_jcf_label, get_jcf_label_here, put_linenumber, localvar_alloc, localvar_free, get_access_flags, write_chunks, adjust_typed_op, generate_bytecode_conditional, generate_bytecode_return, perform_relocations, init_jcf_state, init_jcf_method, release_jcf_state, generate_classfile): Add static prototype. (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED. (make_class_file_name): Const-ify. * jcf.h (find_classfile): Const-ify. * jv-scan.c (reset_report): Remove prototype. * jvgenmain.c: Include jcf.h/tree.h/java-tree.h. (error): Rewrite to allow varargs. * lang.c (lang_f_options): Const-ify. * lex.c (java_parse_escape_sequence): Add static prototype. (java_allocate_new_line): Match definition to existing static prototype. * mangle.c Include tree.h/java-tree.h. (unicode_mangling_length, emit_unicode_mangled_name, append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify. * parse.h (jdep_code): Remove trailing comma in enumeration. (java_get_line_col): Move prototype outside of !JC1_LITE test. (reset_report): Add prototype. * verify.c (push_pending_label, merge_types): Add static prototypes. * zipfile.h (opendir_in_zip, open_in_zip): Prototype. From-SVN: r25878
1999-02-26check-init.c (check_init): COPYN takes word count, not bit count.Per Bothner1-1/+1
� * check-init.c (check_init): COPYN takes word count, not bit count. From-SVN: r25470
1999-02-19Use new TRY_FINALLY_EXPR tree node.Per Bothner1-6/+10
( Use new TRY_FINALLY_EXPR tree node. See ChangeLog. From-SVN: r25312
1999-01-29* check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.Richard Henderson1-1/+1
From-SVN: r24909
1999-01-28check-init.c (check_bool2_init, [...]): Handle TRUTH_AND_EXPR, ↵Per Bothner1-2/+8
TRUTH_OR_EXPR, and TRUTH_XOR_EXPR. � * check-init.c (check_bool2_init, check_bool_init, check_init): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR. * jcf-write.c (generate_bytecode_insns): Likewise. From-SVN: r24900