aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
AgeCommit message (Collapse)AuthorFilesLines
2004-10-14re PR other/17900 (GCC's source path in ICE is wrong)Ben Elliston1-1/+1
PR other/17900 * diagnostic.c (trim_filename): Fix logic bug in walking backwards up the filename looking for a previous directory separator. From-SVN: r89029
2004-10-06pretty-print.c: Include tree.h.Zack Weinberg1-71/+36
* pretty-print.c: Include tree.h. (pp_base_prepare_to_format): New function, logic from text_specifies_location. (pp_base_format_text): Use gcc_assert. * pretty-print.h (pp_prepare_to_format): New macro. (pp_base_prepare_to_format): Prototype. * diagnostic.c (text_specifies_location): Delete. (bug_report_request): Delete. (diagnostic_set_info): Don't call text_specifies_location. (diagnostic_action_after_output): Put text from bug_report_request inline here. Use gcc_unreachable. (diagnostic_report_current_function): Fix comment. (diagnostic_report_diagnostic): Clarify logic for error recursion. Call pp_prepare_to_format before diagnostic_starter. (trim_filename): Use IS_DIR_SEPARATOR. (fatal_error, internal_error): Use gcc_unreachable. (error_recursion): Call diagnostic_action_after_output to issue the bug_report_request message and exit. * Makefile.in (diagnostic.o, pretty-print.o): Update dependencies. * c-parse.in: Add list of diagnostic messages to insulate translation template from version of yacc/bison used to compile the grammar. java: * parse.y, parse-scan.y: Add list of diagnostic messages to insulate translation template from version of yacc/bison used to compile the grammar. treelang: * parse.y: Add list of diagnostic messages to insulate translation template from version of yacc/bison used to compile the grammar. po: * gcc.pot: Regenerate. From-SVN: r88590
2004-09-08dbxout.c (dbxout_type, [...]): Use gcc_assert and gcc_unreachable.Nathan Sidwell1-4/+2
* dbxout.c (dbxout_type, dbxout_type_name, dbxout_symbol): Use gcc_assert and gcc_unreachable. * ddg.c (create_ddg_dependence, add_deps_for_def, add_deps_for_use, create_ddg, add_edge_to_ddg): Likewise. * df.c (df_ref_unlink, df_ref_record, df_uses_record, df_reg_def_chain_create, df_reg_use_chain_create, df_analyze, df_insn_delete, df_refs_reg_replace, df_ref_reg_replace, df_insns_modify, df_pattern_emit_before, df_bb_reg_live_start_p, df_bb_reg_live_end_p, df_bb_regs_lives_compare, df_bb_single_def_use_insn_find, dataflow_set_a_op_b, dataflow_set_copy, hybrid_search, diagnostic.c, diagnostic_build_prefix, diagnostic_count_diagnostic): Likewise. * dojump.c (do_jump): Likewise. * dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree, compute_dom_fast_query, calculate_dominance_info, free_dominance_info, get_immediate_dominator, set_immediate_dominator, get_dominated_by, redirect_immediate_dominators, nearest_common_dominator, dominated_by_p, verify_dominators, recount_dominator, iterate_fix_dominators, add_to_dominance_info, delete_from_dominance_info): Likewise. * dwarf2asm.c (size_of_encoded_value, eh_data_format_name, dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128, dw2_force_const_mem, dw2_asm_output_encoded_addr_rtx): Likewise. * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes, reg_save, initial_return_save, stack_adjust_offset, dwarf2out_stack_adjust, flush_queued_reg_saves, dwarf2out_frame_debug_expr, dwarf2out_frame_debug, dw_cfi_oprnd1_desc, output_cfi, output_call_frame_info, output_loc_operands, build_cfa_loc, decl_ultimate_origin, AT_flag, AT_int, AT_unsigned, AT_string, AT_string_form, add_AT_specification, AT_ref, set_AT_ref_external, AT_loc, AT_loc_list, AT_addr, AT_lbl, add_child_die, splice_child_die, attr_checksum, same_dw_val_p, break_out_includes, build_abbrev_table, size_of_die, mark_dies, unmark_dies, value_format, output_loc_list, output_die, output_pubnames, output_aranges, base_type_die, is_base_type, modified_type_die, dbx_reg_number, multiple_reg_loc_descriptor, mem_loc_descriptor, loc_descriptor, loc_descriptor_from_tree_1, field_byte_offset, add_data_member_location_attribute, add_const_value_attribute, rtl_for_decl_location, add_location_or_const_value_attribute, add_byte_size_attribute, add_bit_offset_attribute, add_bit_size_attribute, add_abstract_origin_attribute, pop_decl_scope, scope_die_for, decl_start_label, gen_formal_parameter_die, gen_type_die_for_member, gen_subprogram_die, gen_label_die, gen_typedef_die, gen_type_die, gen_tagged_type_instantiation_die, force_decl_die, force_type_die, gen_decl_die, dwarf2out_imported_module_or_decl, prune_unused_types_prune, dwarf2out_finish): Likewise. From-SVN: r87176
2004-08-30c-opts.c (c_common_handle_option): <case OPT_Werror> set ↵Gabriel Dos Reis1-6/+5
global_dc->warning_as_error_requested. * c-opts.c (c_common_handle_option): <case OPT_Werror> set global_dc->warning_as_error_requested. * diagnostic.c (diagnostic_initialize): Tidy. * diagnostic.h (diagnostic_context::x_data): Remove (diagnostic_context::issue_warnings_are_errors_message): Rename from warnings_are_errors_message. (diagnostic_context::warning_as_error_requested): New. From-SVN: r86750
2004-06-30Conditionally compile support for --enable-mapped_location.Per Bothner1-12/+17
* cfgexpand.c: Handle USE_MAPPED_LOCATION case for function_end_locus. * cfglayout.c (insn_locators_initialize): Const cleanup. New macros. * cfgrtl.c (delete_insn): Use new NOTE_DELETED_LABEL_NAME macro. * print-rtl.c (print_rtx): Likewise. * emit-rtl.c: Don't clear NOTE_SOURCE_FILE if USE_MAPPED_LOCATION. * combine.c: Use new SET_INSN_DELETED macro. * flow.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * recog.c: Likewise. * reload1.c: Likewise. * diagnostic.c: Use expand_location macro. * pretty-print.c (pp_base_format_text): Likewise. * profile.c: Likewise. * dwarf2out.c: Likewise. Also use expand_location, DECL_IS_BUILTIN. * dwarf2out.c (dwarf2out_decl: Use BUILTINS_LOCATION. * emit-rtl.c (emit_line_note): Simplify if USE_MAPPED_LOCATION. (force_next_line_note, insn_emit): Handle USE_MAPPED_LOCATION case. * final.c (final): Likewise. * haifa-sched.c: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * rtl-error.c: Likewise. * stmt.c (check_seenlabel): Likewise. * tree-pretty-print.c: Likewise. From-SVN: r83921
2004-06-14Makefile.in (FLAGS_H): New.Zdenek Dvorak1-1/+0
* Makefile.in (FLAGS_H): New. (flags.h): Replace by FLAGS_H. * c.opt: Document Var, VarExists, Init and Report attributes. * common.opt: Fill the values of the attributes. * diagnostic.c (flag_fatal_errors): Do not define. * except.c (flag_non_call_exceptions): Do not define. * flags.h: Include options.h. Remove declarations conflicting with the automatically defined ones. * opts.c: Remove automatically defined variables. (handle_option): Perform default initialization. (common_handle_option): Do not handle options covered by the default initialization. * opts.h (struct cl_option): Add flag_var, has_set_value and set_value fields. (CL_REPORT): New. * opts.sh: Generate variable declarations, handle CL_REPORT. * toplev.c: Remove automatically defined variables. (f_options): Removed. (print_switch_values): Use cl_options instead of f_options. * toplev.h (version_flag): Declaration removed. From-SVN: r83105
2004-06-03tree.h: Remove include of version.hMark G. Adams1-0/+1
* tree.h: Remove include of version.h * c-cppbuiltin.c: Include version.h * diagnostic.c: Include version.h * dwarf2out.c: Include version.h * toplev.c: Include version.h * vmsdbgout.c: Include version.h * Makefile.in: Remove dependency on version.h from TREE_H, and add dependencies to required .o targets * gjavah.c: Include version.h From-SVN: r82601
2004-04-29Patch from Richard Guenther.Richard Guenther1-0/+6
* commom.opt (Wfatal-errors): Add it. * diagnostic.c (flag_fatal_errors): Define it. (diagnostic_action_after_output): Check for flag_fatal_errors. * flags.h (flag_fatal_errors): Declare it. * opts.c (common_handle_option): Add OPT_Wfatal_errors. * doc/invoke.texi (Warning Options): Document -Wfatal-errors. From-SVN: r81323
2004-03-14alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) () with ↵Roger Sayle1-1/+1
lang_hooks.foo (). * alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) () with lang_hooks.foo (). * builtins.c (expand_builtin_va_arg): Likewise. * c-common.c (fname_as_string, c_common_truthvalue_conversion, c_common_type_for_mode, c_common_nodes_and_builtins, handle_mode_attribute, handle_vector_size_attribute): Likewise. * c-convert.c (convert): Likewise. * c-format.c (check_format_types): Likewise. * c-objc-common.c (c_tree_printer): Likewise. * c-typeck.c (build_unary_op, build_conditional_expr, build_binary_op): Likewise. * calls.c (try_to_integrate, expand_call, emit_library_call_value_1): Likewise. * cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p): Likewise. * cgraphunit.c (record_call_1, cgraph_analyze_function, cgraph_expand_function): Likewise. * convert.c (convert_to_pointer, convert_to_integer): Likewise. * coverage.c (build_fn_info_type, build_ctr_info_type, build_gcov_info, create_coverage): Likewise. * dbxout.c (dbxout_init): Likewise. * diagnostic.c (diagnostic_report_current_function): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2_name): Likewise. * except.c (init_eh): Likewise. * explow.c (expr_size, int_expr_size): Likewise. * expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add): Likewise. * expr.c (store_expr, store_constructor, safe_from_p, expand_expr_real, do_store_flag, try_casesi): Likewise. * function.c (push_function_context_to, pop_function_context_from, free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack, allocate_struct_function, current_function_name): Likewise. * integrate.c (copy_decl_for_inlining, expand_inline_function): Likewise. * langhooks.c (lhd_clear_binding_stack, write_global_declarations, lhd_print_error_function): Likewise. * opts.c (handle_option, decode_options): Likewise. * passes.c (open_dump_file): Likewise. * print-tree.c (print_node): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_asm_operands, expand_decl_cleanup, emit_case_nodes): Likewise. * stor-layout.c (variable_size): Likewise. * toplev.c (announce_function, wrapup_global_declarations, check_global_declarations, compile_file, default_tree_printer, process_options, lang_dependent_init, finalize): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-inline.c (remap_decl, remap_block, copy_body_r, initialize_inlined_parameters, declare_return_variable, inlinable_function_p, expand_call_inline, optimize_inline_calls, walk_tree, copy_tree_r): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. * tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp, unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl, variably_modified_type_p, dump_tree_statistics): Likewise. * varasm.c (assemble_variable, compare_constant, copy_constant, force_const_mem, compute_reloc_for_constant, output_constant, output_addressed_constants, initializer_constant_valid_p): Likewise. From-SVN: r79481
2004-02-27bb-reorder.c, [...]: Update copyright.Kazu Hirata1-1/+2
gcc/ * bb-reorder.c, cfgbuild.c, diagnostic.c, explow.c, profile.c, ra-build.c, read-rtl.c, tracer.c, unwind-dw2-fde-glibc.c, value-prof.c, config/darwin-protos.h, config/frv/frv-abi.h, config/i386/pmmintrin.h, config/pa/pa-hpux.h: Update copyright. gcc/java/ * java/parse.h: Update copyright. From-SVN: r78566
2004-02-27passes.c: New file.Richard Henderson1-2/+0
* passes.c: New file. * Makefile.in (OBJS-common): Add it. * diagnostic.c (rtl_dump_and_exit): Move decl ... * flags.h (rtl_dump_and_exit): ... here. * output.h (size_directive_output, last_assemble_variable_decl): Move from toplev.c. * rtl.h (reg_alloc): Move from toplev.c. * toplev.c (HAVE_conditional_execution, DUMPFILE_FORMAT, struct dump_file_info, enum dump_file_index, dump_file_tbl, open_dump_file, close_dump_file, rest_of_decl_compilation, rest_of_type_compilation, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_new_regalloc, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_addressof, rest_of_handle_sibling_calls, rest_of_handle_jump_bypass, rest_of_handle_inlining, rest_of_handle_null_pointer, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_compilation): Move to passes.c. (decode_d_option): Use enable_rtl_dump_file. (compile_file, finalize, do_compile): Move profile+combine+graph cleanup to finish_optimization_passes. * toplev.h (init_optimization_passes, finish_optimization_passes, enable_rtl_dump_file): Declare. From-SVN: r78561
2003-09-21Revert DECL_SOURCE_LOCATION -> TREE_LOCUS change.Richard Henderson1-1/+1
From-SVN: r71641
2003-09-21tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.Richard Henderson1-1/+1
* tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const. (TREE_FILENAME, TREE_LINENO): Likewise. (set_tree_locus, copy_tree_locus, set_tree_file_line): New. (TREE_LOCUS_SET_P): New. * c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c, diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c, print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c, tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c, config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match. ada/ * trans.c, utils.c: Update for DECL_SOURCE_LOCATION rename and change to const. cp/ * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, method.c, optimize.c, pt.c, semantics.c, tree.c: Update for DECL_SOURCE_LOCATION rename and change to const. f/ * com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and change to const. java/ * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, resource.c: Update for DECL_SOURCE_LOCATION rename and change to const. treelang/ * treetree.c: Update for DECL_SOURCE_LOCATION rename and change to const. From-SVN: r71636
2003-09-20c-format.c (gcc_diag_char_table): Add %J.Richard Henderson1-2/+9
* 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-07* diagnostic.c (warn_deprecated_use): Move to toplev.cGabriel Dos Reis1-38/+0
From-SVN: r71168
2003-09-07langhooks.c (lhd_print_error_function): Move from diagnostic.c.Gabriel Dos Reis1-34/+0
* langhooks.c (lhd_print_error_function): Move from diagnostic.c. * Makefile.in (langhooks.o): Depend on diagnostic.h From-SVN: r71165
2003-09-06* diagnostic.c (announce_function): Move to toplev.c.Gabriel Dos Reis1-17/+0
From-SVN: r71146
2003-07-25Remove pedwarn_with_decl, warning_with_decl and error_with_decl from GCC.Gabriel Dos Reis1-748/+45
Remove pedwarn_with_decl, warning_with_decl and error_with_decl from GCC. * calls.c (try_to_integrate): Don't use xxx_with_decl. (expand_call): Likewise. * dwarfout.c (output_reg_number): Likewise. * expr.c (expand_expr): Likewise. * function.c (assign_temp): Likewise. (uninitialized_vars_warning): Likewise. (setjmp_args_warning): Likewise. (expand_function_end): Likewise. * stmt.c (fixup_gotos): Likewise. (warn_about_unused_variables): Likewise. (expand_end_bindings): Likewise. * stor-layout.c (layout_decl): Likewise. (place_field): Likewise. * toplev.c (check_global_declarations): Likewise. (rest_of_handle_inlining): Likewise. (default_tree_printer): New function. (general_init): Initialize diagnostic machinery before routing signals to the ICE machinery. Set default tree printer. * toplev.h (pedwarn_with_decl): Remove declaration. (warning_with_decl): Likewise. (error_with_decl): Likewise. (pedwarn): Remove attribute for the time being. * tree-inline.c (expand_call_inline): Don't use xxx_with_decl. * varasm.c (named_section): Likewise. (make_decl_rtl): Likewise. (assemble_variable): Likewise. (merge_weak): Likewise. (declare_weak): Likewise. * diagnostic.h: Move non-diagnostic stuff into pretty-print.h. * diagnostic.c: Move non-diagnostic stuff into pretty-print.c. (format_with_decl): Remove. (diagnostic_for_decl): Likewise. (pedwarn_with_decl): Likewise. (warning_with_decl): Likewise. (error_with_decl): Likewise. (diagnostic_initialize): Adjust. (diagnostic_count_diagnostic): Likewise. (announce_function): Likewise. (lhd_print_error_function): Likewise. (diagnostic_report_current_module): Likewise. (default_diagnostic_starter): Likewise. (diagnostic_report_diagnostic): Likewise. (default_diagnostic_finalizer): Likewise. (verbatim): Likewise. (error): Likewise. (warning): Likewise. * opts.c (common_handle_option): Likewise. * pretty-print.c: New file. * c-pretty-print.h (pp_base): Override. * c-pretty-print.c: Adjust use of macros throughout. (pp_buffer): New macro. (pp_newline): Likewise. * c-objc-common.c (c_tree_printer): Adjust prototype. Tidy. * Makefile.in (DIAGNOSTIC_H): New variable. (c-errors.o): Use it. (c-objc-common.o): Likewise. (c-common.o): Likewise. (c-opts.o): Likewise. (c-format.o): Likewise. (diagnostic.o): Likewise. (opts.o): Likewise. (toplev.o): Likewise. (rtl-error.o): Likewise. (dwarf2out.o): Likewise. (jump.o): Likewise. (pretty-print.o): New rule. cp/ * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H. * error.c: Use the new pretty-printer fraamework. From-SVN: r69773
2003-07-22alias.c: Fix comment formatting.Kazu Hirata1-2/+2
* alias.c: Fix comment formatting. * c-common.c: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * combine.c: Likewise. * cpplib.c: Likewise. * diagnostic.c: Likewise. * dojump.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * gcc.c: Likewise. * gcse.c: Likewise. * ggc-page.c: Likewise. * jump.c: Likewise. * loop.c: Likewise. * mips-tfile.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. From-SVN: r69689
2003-07-22diagnostic.c. (diagnostic_report_current_module): Update to match 2003-06-05 ↵Per Bothner1-11/+9
changes to push_srcloc and pop_srcloc. * diagnostic.c.(diagnostic_report_current_module): Update to match 2003-06-05 changes to push_srcloc and pop_srcloc. From-SVN: r69687
2003-07-15re PR c++/11531 (ICE on invalid code (returning to void))Gabriel Dos Reis1-2/+2
PR c++/11531 * diagnostic.c (diagnostic_report_diagnostic): Don't ICE if we're not recursing on hard error. (diagnostic_for_decl): Likewise. * diagnostic.def: Rearrange. cp/ * typeck.c (check_return_expr): Fix thinko in diagnostic. From-SVN: r69425
2003-07-07genextract.c: Convert remaining prototypes to ISO C90.Andreas Jaeger1-3/+2
2003-07-07 Andreas Jaeger <aj@suse.de> * genextract.c: Convert remaining prototypes to ISO C90. * cpplex.c (_cpp_free_buff): Convert prototype to ISO C90. * fold-const.c (fold_single_bit_test): Likewise. * diagnostic.c (default_diagnostic_finalizer): Likewise. * cfgrtl.c (rtl_redirect_edge_and_branch): Likewise. * gengtype.c (write_array): Generate ISO C90 prototypes. * genflags.c (gen_proto): Generate ISO C90 prototypes. For cp: 2003-07-07 Andreas Jaeger <aj@suse.de> * friend.c: Convert to ISO C90 prototypes. * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output language. * cfns.h: Regenerate. * typeck.c: Convert remaining prototypes to ISO C90. * search.c: Likewise. * decl2.c (build_expr_from_tree): Convert prototype to ISO C90. * semantics.c (expand_or_defer_fn): Likewise * mangle.c (discriminator_for_string_literal): Likewise. * g++spec.c (lang_specific_driver): Likewise. * search.c (lookup_base_r): Remove unused variable. From-SVN: r69050
2003-07-01basic-block.h: Fix comment typos.Kazu Hirata1-2/+2
* basic-block.h: Fix comment typos. * bb-reorder.c: Likewise. * c-format.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.h: Likewise. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.h: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * dbxout.c: Likewise. * df.c: Likewise. * df.h: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * et-forest.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.h: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genautomata.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * loop.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * ra-build.c: Likewise. * ra-colorize.c: Likewise. * ra-rewrite.c: Likewise. * ra.h: Likewise. * regmove.c: Likewise. * reload.c: Likewise. * rtlanal.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-vis.c: Likewise. * sreal.c: Likewise. * ssa-ccp.c: Likewise. * ssa.c: Likewise. * toplev.c: Likewise. * tree-inline.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. From-SVN: r68770
2003-06-29alloc-pool.c: Fix comment formatting.Kazu Hirata1-1/+1
* alloc-pool.c: Fix comment formatting. * bitmap.c: Likewise. * bitmap.h: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * cfganal.c: Likewise. * cfgrtl.c: Likewise. * collect2.c: Likewise. * cse.c: Likewise. * df.c: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * expmed.c: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * libgcov.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * prefix.c: Likewise. * rtlanal.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * toplev.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r68672
2003-06-28diagnostic.h (diagnostic_set_info): Replace file and lineno parameters with ↵Nathan Sidwell1-26/+14
a location_t. * diagnostic.h (diagnostic_set_info): Replace file and lineno parameters with a location_t. * diagnostic.c (diagnostic_set_info): Replace file and lineno parameters with a location_t. (inform, warning, pedwarn, error, sorry, fatal_error, internal_error, warning_with_decl, pedwarn_with_decl, error_with_decl): Adjust. * c-error.c (pedwarn_c99): Adjust. * c-format.c (status_warning): Adjust. * rtl-error.c (file_and_line_for_asm): Rename to ... (location_for_asm): Return a location_t. (diagnostic_for_asm): Adjust. * cp/cp-tree.h (cp_line_of, cp_file_of): Remove. * cp/error.c (cp_line_of, cp_file_of): Merge into ... (location_of): ... here. Make static, return a location_t. (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust. * testsuite/g++.old-deja/g++.robertl/eb133.C: Set expected line number. * testsuite/g++.old-deja/g++.robertl/eb133a.C: Likewise. * testsuite/g++.old-deja/g++.robertl/eb133b.C: Likewise. From-SVN: r68643
2003-06-28diagnostic.c (output_integer_with_precision): New macro.Gabriel Dos Reis1-105/+80
* diagnostic.c (output_integer_with_precision): New macro. (output_format): Use it. Handle more format specifiers. (output_long_decimal): Remove. (output_unsigned_decimal): Likewise. (output_long_unsigned_decimal): Likewise. (output_octal): Likewise. (output_long_octal): Likewise. (output_hexadecimal): Likewise. (output_long_hexadecimal): Likewise. (output_long_long_decimal): Likewise. From-SVN: r68638
2003-06-23basic-block.h: Fix comment formatting.Kazu Hirata1-1/+1
* basic-block.h: Fix comment formatting. * bt-load.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-format.c: Likewise. * coverage.c: Likewise. * cpplib.h: Likewise. * cpppch.c: Likewise. * dbxout.c: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * profile.c: Likewise. * real.h: Likewise. * sched-deps.c: Likewise. From-SVN: r68369
2003-06-22diagnostic.h (output_host_wide_integer): Declare.Gabriel Dos Reis1-0/+28
* diagnostic.h (output_host_wide_integer): Declare. * diagnostic.c (output_long_long_decicaml): New function. (output_host_wide_integer): Likewise. (output_format): Use them. Handle "%ll" and "%w". From-SVN: r68323
2003-06-20c-decl.c (store_parm_decls): Make saved_warn_shadow boolean.Neil Booth1-1/+0
* c-decl.c (store_parm_decls): Make saved_warn_shadow boolean. * common.opt: Add remaining -W options and -g. * diagnostic.c (warnings_are_errors): Remove. * flags.h: Make most warning flags boolean. * opts.c (common_handle_option): Handle remaining -W options, and -g. Move many warning flags from toplev.c, making them boolean. * toplev.c: Remove many warning flags. (decode_W_option): Remove. (decode_g_option): Make extern. Error on unknown switch. (lang_independent_W_options): Use warn_dummy. (independent_decode_option): Just handle -f switches now. * toplev.h (decode_g_option): New. From-SVN: r68287
2003-06-08predict.h: Convert to ISO C90 prototypes.Andreas Jaeger1-169/+93
* predict.h: Convert to ISO C90 prototypes. * predict.c: Likewise. * tree-dump.h: Likewise. * tree-dump.c: Likewise. * diagnostic.h: Likewise. * diagnostic.c: Likewise. * combine.c: Likewise. * rtl.h: Convert prototypes of combine.c to ISO C90. From-SVN: r67626
2003-05-17builtins.c (validate_arglist): Eliminate libiberty VA_ macros, always use ↵Kaveh R. Ghazi1-74/+62
stdarg. gcc: * builtins.c (validate_arglist): Eliminate libiberty VA_ macros, always use stdarg. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-semantics.c (build_stmt): Likewise. * calls.c (emit_library_call, emit_library_call_value): Likewise. * collect2.c (notice, fatal_perror, fatal, error): Likewise. * cpperror.c (cpp_error, cpp_error_with_line): Likewise. * diagnostic.c (build_message_string, output_printf, output_verbatim, verbatim, inform, warning, pedwarn, error, sorry, fatal_error, internal_error, warning_with_decl, pedwarn_with_decl, error_with_decl, fnotice): Likewise. * dwarf2asm.c (dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset, dw2_asm_output_pcrel, dw2_asm_output_addr, dw2_asm_output_addr_rtx, dw2_asm_output_nstring, dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128, dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128, dw2_asm_output_encoded_addr_rtx): Likewise. * emit-rtl.c (gen_rtx, gen_rtvec): Likewise. * errors.c (warning, error, fatal, internal_error): Likewise. * final.c (output_operand_lossage, asm_fprintf): Likewise. * fix-header.c (fatal): Likewise. * gcc.c (fatal, error, notice): Likewise. * gcov.c (fnotice): Likewise. * genattrtab.c (attr_rtx, attr_printf): Likewise. * gengtype.c (error_at_line, xasprintf, oprintf): Likewise. * gensupport.c (message_with_line): Likewise. * mips-tfile.c (fatal, error): Likewise. * protoize.c (notice): Likewise. * ra-debug.c (ra_debug_msg): Likewise. * read-rtl.c (fatal_with_file_and_line): Likewise. * rtl-error.c (error_for_asm, warning_for_asm): Likewise. * tree.c (build, build_nt, build_function_type_list): Likewise. cp: * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate libiberty VA_ macros, always use stdarg. * rtti.c (create_pseudo_type_info): Likewise. * tree.c (build_min_nt, build_min): Likewise. From-SVN: r66919
2003-05-13diagnostic.c (output_format): Add support for %m.Zack Weinberg1-22/+13
* diagnostic.c (output_format): Add support for %m. (output_printf, output_verbatim, diagnostic_set_info, verbatim): Set err_no field of the text_info structure being initialized. (fatal_io_error): Delete function. * diagnostic.h (text_info): Add err_no field. * toplev.h (fatal_io_error): Delete prototype. * c-opts.c, c-pch.c, dwarfout.c, ggc-common.c, ggc-page.c, graph.c * toplev.c, config/mips/mips.c, config/rs6000/host-darwin.c * f/com.c, java/jcf-parse.c, java/jcf-write.c, java/lex.c * objc/objc-act.c: Replace all calls to fatal_io_error with calls to fatal_error; add ": %m" to the end of all the affected error messages. From-SVN: r66769
2003-05-12diagnostic.c (diagnostic_for_decl): Take a diagnostic_context argument.Zack Weinberg1-80/+129
* diagnostic.c (diagnostic_for_decl): Take a diagnostic_context argument. Restructure to be consistent with diagnostic_report_diagnostic. (diagnostic_count_diagnostic): Now static. Take a diagnostic_info argument, not just a diagnostic_t. Some code moved here from internal_error. Move a case label for clarity. (diagnostic_action_after_output): New function. Code moved here from internal_error and fatal_error. (bug_report_request): New #define so that this text appears in only one place. (diagnostic_report_diagnostic): Update to match changes to diagnostic_count_diagnostic. Call diagnostic_action_after_output. (diagnostic_set_info): Call gettext here. (pedwarn): Update comment. Don't call gettext here. (sorry): Use report_diagnostic. Don't call gettext here. (fatal_error): Remove final fnotice and exit, but call real_abort to prevent warnings about noreturn function returning. (internal_error): Likewise. Don't do ICE suppression here nor call context->internal_error. (warning_with_decl): Suppress for decls in system headers. Adjust call to diagnostic_for_decl. (pedwarn_with_decl): Likewise. (error_with_decl): Adjust call to diagnostic_for_decl. (error_recursion): Use bug_report_request. * diagnostic.h: Remove prototype of diagnostic_count_diagnostic. * objc/objc-act.c (error_with_ivar, warn_with_method): Don't call diagnostic_count_diagnostic. f: * bad.c: Don't call diagnostic_count_diagnostic. From-SVN: r66728
2003-05-11diagnostic.c: Reorder functions for clarity...Zack Weinberg1-307/+322
* diagnostic.c: Reorder functions for clarity, putting all the functions in the "error" family next to each other, and likewise all the functions in the "error_with_decl" family. Some other routines were moved too. Add comments. (vbuild_message_string): Fold into sole caller. From-SVN: r66676
2003-05-09toplev.h (warning_with_file_and_line): Don't declare.Gabriel Dos Reis1-32/+0
* toplev.h (warning_with_file_and_line): Don't declare. (error_with_file_and_line): Likewise. * diagnostic.c (error_with_file_and_line): Remove. (warning_with_file_and_line): Likewise. From-SVN: r66628
2003-05-04toplev.h (pedwarn_with_file_and_line): Don't declare.Gabriel Dos Reis1-17/+0
* toplev.h (pedwarn_with_file_and_line): Don't declare. * diagnostic.c (pedwarn_with_file_and_line): Remove. From-SVN: r66456
2003-05-02Clarify the comment before the abort we hit when a translated string ↵Wolfgang Bangerth1-1/+3
contains invalid formats. From-SVN: r66381
2003-05-02Makefile.in (TREE_H): Replace location.h with input.h.Nathan Sidwell1-2/+2
* Makefile.in (TREE_H): Replace location.h with input.h. (GTFILES) Remove location.h (gt-lists.h): Replace gt-location.h with gt-input.h * input.h (input_filename, input_line): Remove variables. (location_s, location_t): Move from location.h. (input_location): New. (input_filename, input_line): New #defines. * location.h: Remove. * tree.h: Replace location.h with input.h. (input_filename, input_line): Remove. * diagnostic.h: Replace location.h with input.h. * gcc.h (input_filename, input_filename_length): Remove declarations. * toplev.c (input_filename, input_line): Remove. (input_location): Define. (push_srcloc, pop_srcloc): Adjust. * diagnostic.c (diagnostic_report_current_module): Adjust. f: * lex.c (ffelex_file_pop_): Adjust file_stack member use. (ffelex_file_push_): Likewise. (ffelex_hash_): Likewise. java: * lex.h (input_lineno): Remove declaration. * parse-scan.y: #include input.h. (input_filename): Remove declaration. (input_location): Add definition. (input_line): Remove definition. From-SVN: r66378
2003-05-01input.h (lineno): Rename to ...Nathan Sidwell1-11/+13
* 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-04-30* diagnostic.c (output_pointer): Use HOST_PTR_PRINTF.Gabriel Dos Reis1-1/+1
From-SVN: r66295
2003-04-30diagnostic.h (output_formatted_scalar): Tweak.Gabriel Dos Reis1-29/+26
* diagnostic.h (output_formatted_scalar): Tweak. * diagnostic.c (output_long_decimal): Likewise. (output_unsigned_decimal): Likewise. (output_long_unsigned_decimal): Likewise. (output_octal): Likewise. (output_long_octal): Likewise. (output_hexadecimal): Likewise. (output_long_hexadecimal): Likewise. (output_pointer): New function. (output_format): Use it. Recognize "%p" format specifier. From-SVN: r66287
2003-02-12diagnostic.c (real_abort): New.Geoffrey Keating1-0/+13
* diagnostic.c (real_abort): New. (diagnostic_report_diagnostic): Call real_abort on error. * diagnostic.h (diagnostic_abort_on_error): New. (struct diagnostic_context): Add abort_on_error field. * toplev.c (setup_core_dumping): New. (decode_d_option): Handle 'H' case. * doc/invoke.texi (Debugging Options): Document -dH. From-SVN: r62753
2003-01-18alias.c: Fix comment typos.Kazu Hirata1-2/+2
* alias.c: Fix comment typos. * basic-block.h: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.h: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfglayout.c: Likewise. * cfgrtl.c: Likewise. * convert.c: Likewise. * cpphash.h: Likewise. * cpplex.c: Likewise. * cpplib.h: Likewise. * df.h: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dwarf2.h: Likewise. From-SVN: r61462
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-0/+2
From-SVN: r60174
2002-11-14* diagnostic.c (sorry): Don't repeat "sorry, unimplemented" text.Gabriel Dos Reis1-1/+0
From-SVN: r59113
2002-10-08system.h (GCCBUGURL): Delete.Zack Weinberg1-2/+2
* system.h (GCCBUGURL): Delete. * version.c (bug_report_url): New. Add commentary about modifying both these strings in modified distributions. * version.h: Declare bug_report_url. * diagnostic.c, gcc.c, gcov.c, java/gjavah.c, java/jcf-dump.c, java/jv-scan.c: Globally replace GCCBUGURL with bug_report_url. From-SVN: r57932
2002-09-12diagnostic.c (output_add_identifier): New fn.Jason Merrill1-0/+10
* diagnostic.c (output_add_identifier): New fn. * diagnostic.h: Declare it. From-SVN: r57066
2002-08-29diagnostic.c (fancy_abort): Don't repeat "internal error".Gabriel Dos Reis1-2/+1
* diagnostic.c (fancy_abort): Don't repeat "internal error". * toplev.c (crash_signal): Likewise. From-SVN: r56669
2002-08-12diagnostic.h (output_formatted_scalar): Rename from output_formatted_integer.Gabriel Dos Reis1-8/+8
* diagnostic.h (output_formatted_scalar): Rename from output_formatted_integer. * diagnostic.def: Add DK_DEBUG. * diagnostic.c (output_decimal): Adjust. (output_long_decimal): Likewise. (output_unsigned_decimal): Likewise. (output_octal): Likewise. (output_long_octal): Likewise. (output_hexadecimal): Likewise. (output_long_hexadecimal): Likewise. * c-pretty-print.c (pp_c_type_specifier): New function. (pp_c_specifier_qualifier_list): Likewise. (pp_c_abstract_declarator): Likewise. (pp_c_char): Replace pp_format_integer with pp_format_scalar. From-SVN: r56236
2002-08-04diagnostic.c (inform): New function.Gabriel Dos Reis1-0/+14
* diagnostic.c (inform): New function. * diagnostic.h (inform): Declare. From-SVN: r56022