summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
Commit message (Collapse)AuthorAgeFilesLines
...
* * Makefile.in (C_TREE_H): Update dependencies.ghazi2005-07-231-1/+3
| | | | | | | | | * c-tree.h: Include toplev.h. * diagnostic.h (diagnostic_set_info): Add format attribute. * rtl-error.c (diagnostic_for_asm): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102309 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:zack2005-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pretty-print.h (PP_NL_ARGMAX): New. (text_info): Add locus. (struct chunk_info): New. (output_buffer): Add formatted_obstack, chunk_obstack, and cur_chunk_array. Change obstack to a pointer. (pp_wrapping_mode_t, pp_wrapping_mode, pp_set_verbatim_wrapping): New. (struct pretty_print_info): Replace ideal_maximum_length and prefixing_rule with wrapping. (pp_line_cutoff, pp_prefixing_rule): Update to match. Update prototypes and wrapper macros throughout. * pretty-print.c (pp_formatted_text_data, pp_append_r) (pp_base_clear_output_area, pp_construct, pp_base_formatted_text) (pp_base_last_position_in_text, pp_base_newline, pp_base_character): Update for changes to pp structure. (pp_base_prepare_to_format, pp_base_format_text): Delete. (pp_base_format, pp_base_output_formatted_text): New functions. (pp_base_format_verbatim): Use pp_set_verbatim_wrapping. (pp_verbatim): Clear text.locus. (pp_printf): Likewise. Use pp_format and pp_output_formatted_text. * c-objc-common.c (c_tree_printer): Update function signature. * diagnostic.c (diagnostic_initialize): Update for changes to pp structure. (diagnostic_report_diagnostic): Call pp_format and then pp_output_formatted_text. (verbatim): Clear text.locus. * diagnostic.h (diagnostic_prefixing_rule, diagnostic_line_cutoff): Update for changes to pp structure. * c-lang.c: No need to include c-pretty-print.h. * Makefile.in: Remove bogus line containing only a tab. (c-lang.o): Update dependencies. * toplev.c (announce_function): Don't use verbatim. (default_tree_printer): Update signature. * objc/objc-lang.c: No need to include c-pretty-print.h. * objc/Make-lang.in: Update dependencies. gcc/cp: * cp-lang.c: No need to include cxx-pretty-print.h. * error.c (cp_printer): Update signature. No need to process flags. (print_instantiation_partial_context): Output last newline with pp_base_newline. * Make-lang.in: Update dependencies. gcc/objcp: * objcp-lang.c: No need to include cxx-pretty-print.h. * Make-lang.in: Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101481 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kcook2005-06-251-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101317 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (verbatim): Move ...ghazi2005-06-181-1/+0
| | | | | | | | * toplev.h (verbatim): ... here. Add ATTRIBUTE_GCC_DIAG. * pretty-print.h (pp_verbatim): Add ATTRIBUTE_GCC_PPDIAG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101157 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (fdiagnostics-show-option): No variable is needed.dj2005-05-041-0/+4
| | | | | | | | | | | | | | * diagnostic.h (diagnostic_context): Add show_option_requested flag. * diagnostic.c (diagnostic_initialize): Initialize show_option_requested. (diagnostic_report_diagnostic): Test for enabled diagnostics here. Save and restore original message format. Use flag in context instead of global. (warning): Don't test for enabled warnings here. * opts.c (common_handle_option): Handle -fdiagnostics-show-option here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99204 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinerydj2005-05-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | decide if the warning will be printed. * calls.c (expand_call): Likewise. * function.c (init-function_start): Likewise. * common.opt (-fdiagnostics-show-option): New. * opts.c (option_enabled): Accept the option index instead of a pointer to the option descriptor. * opts.h (option_enabled): Likewise. * toplev.c (print_switch_values): Pass option index, not option descriptor. * diagnostic.h (diagnostic_info): Add option_index. * diagnostic.c: Include opts.h. (diagnostic_set_info): Initialize option_index. (diagnostic_report_diagnostic): Amend option name if appropriate. (warning): Check to see if the specified warning is enabled. Store option index. * doc/invoke.texi (-fdiagnostics-show-options): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99169 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-semantics.c, cfghooks.c, diagnostic.h, loop-iv.c,kazu2005-03-081-1/+2
| | | | | | | | | loop-unswitch.c, modulo-sched.c, stor-layout.c, tree-gimple.h, config/i386/cygwin1.c, doc/cfg.texi, doc/objc.texi: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96100 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h: Remove unused prototypekazu2005-03-081-2/+0
| | | | | | | | | debug_output_buffer. * modulo-sched.c: Remove unused prototype set_row_column_for_ps. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96080 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (c_common_handle_option): <case OPT_Werror> setgdr2004-08-301-4/+4
| | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86750 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge tree-ssa-20020619-branch into mainline.dnovillo2004-05-131-0/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/kazu2004-02-071-1/+1
| | | | | | | | | | | | | | * c-ppoutput.c, cfganal.c, diagnostic.h, print-rtl.c, config/darwin.c, config/darwin.h, config/ia64/ia64-c.c, config/m32r/linux.h, config/rs6000/ppc64-fp.c, config/sparc/openbsd.h, doc/makefile.texi, doc/passes.texi: Update copyright. cp/ * rtti.c: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77449 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (DEFINE_DIAGNOSTIC_KIND): Change parameter M tojsm282004-02-051-1/+1
| | | | | | | msgid. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77341 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtin-attrs.def: Fix comment formatting.kazu2003-08-221-1/+1
| | | | | | | | | | | | * c-pretty-print.c: Likewise. * diagnostic.h: Likewise. * langhooks.h: Likewise. * recog.c: Likewise. * simplify-rtx.c: Likewise. * tree.def: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70676 138bc75d-0d04-0410-961f-82ee72b054a4
* * pretty-print.h (pp_set_line_maximum_length): Make macro.gdr2003-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (pp_set_prefix): Likewise. (pp_destroy_prefix): Likewise. (pp_remaining_character_count_for_line): Likewise. (pp_clear_output_area): Likewise. (pp_formatted_text): Likewise. (pp_last_position_in_text): Likewise. (pp_emit_prefix): Likewise. (pp_append_text): Likewise. (pp_flush): Likewise. (pp_format_text): Likewise. (pp_format_verbatim): Likewise. (pp_tree_identifier): Tidy. * pretty-print.c (pp_base_format_text): Rename from pp_format_text. (pp_base_format_verbatim): Rename from pp_format_verbatim. (pp_base_flush): Rename from pp_flush. (pp_base_set_line_maximum_length): Rename from pp_set_line_maximum_length. (pp_base_clear_output_area): Rename from pp_clear_output_area. (pp_base_set_prefix): Rename from pp_set_prefix. (pp_base_destroy_prefix): Rename from pp_destroy_prefix. (pp_base_emit_prefix): Rename from pp_emit_prefix. (pp_base_append_text): Rename from pp_append_text. (pp_base_formatted_text): Rename from pp_formatted_text. (pp_base_last_position_in_text): Rename from pp_last_position_in_text. (pp_base_remaining_character_count_for_line): Rename from pp_remaining_character_count_for_line. * diagnostic.h (diagnostic_format_decoder): Tidy. (diagnostic_flush_buffer): Likewise. * c-pretty-print.h: (pp_c_string_literal): Declare. (pp_c_real_literal): Likewise. (pp_c_integer_literal): Likewise. * c-pretty-print.c (pp_c_char): Use pp_string in lieu of pp_identifier. (pp_c_character_literal): Tidy. (pp_c_string_literal): Make public. (pp_c_bool_literal): Likewise. (pp_c_integer_literal): Likewise. (pp_c_real_literal): Likewise. * Makefile.in (C_PRETTY_PRINT_H): New variable. (c-pretty-print.o): Update dependence. cp/ * cxx-pretty-print.h: New file. * cxx-pretty-print.c: Likewise. * error.c (scratch_pretty_printer): Change type. (init_error): Tidy. (dump_aggr_type): Likewise. (dump_global_iord): Likewise. (dump_expr): Likewise. (dump_char): Remove. * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. (cxx_initialize_diagnostics): New function. * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o (CXX_PRETTY_PRINT_H): New variable. (cp/cxx-pretty-print.o): New rule. (cp/cp-lang.o): Update dependence. (cp/error.o): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70182 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove pedwarn_with_decl, warning_with_decl and error_with_declgdr2003-07-251-153/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69773 138bc75d-0d04-0410-961f-82ee72b054a4
* * bt-load.c: Fix comment typos.kazu2003-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-incpath.c: Likewise. * cfg.c: Likewise. * cfgcleanup.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * diagnostic.h: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * et-forest.h: Likewise. * expr.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * jump.c: Likewise. * langhooks.h: Likewise. * local-alloc.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * ra-build.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * rtl.def: Likewise. * rtlanal.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * simplify-rtx.c: Likewise. * ssa.c: Likewise. * tracer.c: Likewise. * tree.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68975 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:ghazi2003-07-041-1/+0
| | | | | | | | | | | | | | | | | | | | | * c-aux-info.c: Include toplev.h after c-tree.h. * c-common.c: Likewise. (GCC_DIAG_STYLE): Undef. * c-semantics.c (GCC_DIAG_STYLE): Define. * c-tree.h (GCC_DIAG_STYLE): Likewise. * diagnostic.h (inform): Move prototype to toplev.h. * jump.c: Include diagnostic.h before toplev.h. * toplev.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG): Define. (warning, error, fatal_error, pedwarn, sorry, inform, error_for_asm, warning_for_asm): Mark with ATTRIBUTE_GCC_CXXDIAG. cp: * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define. (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with ATTRIBUTE_GCC_CXXDIAG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68910 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (diagnostic_set_info): Replace file and linenonathan2003-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68643 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (output_host_wide_integer): Declare.gdr2003-06-221-0/+1
| | | | | | | | | * diagnostic.c (output_long_long_decicaml): New function. (output_host_wide_integer): Likewise. (output_format): Use them. Handle "%ll" and "%w". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68323 138bc75d-0d04-0410-961f-82ee72b054a4
* (gcc)kraai2003-06-131-1/+1
| | | | | | | | | | | | | | | | * ChangeLog.1: Fix spelling of "outputting". * ChangeLog.3: Likewise. * diagnostic.h: Likewise. * genautomata.c: Likewise. * config/pa/pa.c: Likewise. (gcc/ada) * gnatls.adb: Fix spelling of "outputting". * gnatmem.adb: Likewise. * prj-pp.adb: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67890 138bc75d-0d04-0410-961f-82ee72b054a4
* * predict.h: Convert to ISO C90 prototypes.aj2003-06-081-40/+34
| | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67626 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (output_verbatim, verbatim): Remove printfgdr2003-05-251-4/+2
| | | | | | | attribute. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67169 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c (output_format): Add support for %m.zack2003-05-131-0/+1
| | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66769 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c (diagnostic_for_decl): Take azack2003-05-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66728 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (TREE_H): Replace location.h with input.h.nathan2003-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66378 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (output_formatted_scalar): Tweak.gdr2003-04-301-2/+2
| | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66287 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c (real_abort): New.geoffk2003-02-121-2/+9
| | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62753 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Fix comment typos.kazu2003-01-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61462 138bc75d-0d04-0410-961f-82ee72b054a4
* * dbxout.c: Follow spelling conventions.kazu2002-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defaults.h: Likewise. * df.c: Likewise. * diagnostic.h: Likewise. * doloop.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flags.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genconfig.c: Likewise. * genrecog.c: Likewise. * ggc-page.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * gthr-win32.h: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * langhooks.h: Likewise. * line-map.h: Likewise. * local-alloc.c: Likewise. * longlong.h: Likewise. * loop.c: Likewise. * loop.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57406 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c (output_add_identifier): New fn.jason2002-09-121-0/+1
| | | | | | | * diagnostic.h: Declare it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57066 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (output_formatted_scalar): Rename fromgdr2002-08-121-2/+2
| | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56236 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c (inform): New function.gdr2002-08-041-0/+1
| | | | | | | * diagnostic.h (inform): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56022 138bc75d-0d04-0410-961f-82ee72b054a4
* * pretty-print.h: Define more macros.gdr2002-07-291-0/+8
| | | | | | | | * diagnostic.h (output_formatted_integer): Moved from... * diagnostic.c: ... here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55833 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h: #include location.hgdr2002-07-101-10/+1
| | | | | | | | | | | | | | | | (location_t): Move definition to.. * location.h: ... here. New file. * tree.h: #include location.h (DECL_SOURCE_LOCATION): New macro. (DECL_SOURCE_FILE): Use. (DECL_SOURCE_LINE): Likewise. (struct tree_decl): REplace filename and linenum with locus. * Makefile.in (TREE_H): add location.h (diagnostic.o): Depends on gt-location.h (gt-location.h): Depends on s-gtype git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55364 138bc75d-0d04-0410-961f-82ee72b054a4
* * objc/objc-act.c (warn_with_ivar): Adjust calls togdr2002-06-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic_count_error. (warn_with_method): Likewise. * diagnostic.h (warnings_are_errors_message): New field of diagnostic_context. (diagnostic_count_error): Rename to diagnostic_count_diagnostic to match semantics. * diagnostic.c: Adjust calls to diagnostic_count_error through out. (diagnostic_count_diagnostic): Make aware of other kinds of diagnostics. (diagnostic_initialize): Initialize warnings_are_errors_message field. f/ 2002-06-12 Gabriel Dos Reis <gdr@codesourcery.com> * bad.c (ffebad_start_): Adjust calls to diagnostic_count_error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54532 138bc75d-0d04-0410-961f-82ee72b054a4
* * toplev.h (report_error_function): Remove.gdr2002-06-051-91/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * diagnostic.h (location_t): New datatype. (text_info): Likewise. (diagnostic_info): Likewise. (output_prefix): New macro. (diagnostic_last_function_changed): Likewise. (diagnostic_set_last_function): Likewise. (diagnostic_last_module_changed): Likewise. (diagnostic_set_last_module): Likewise. (report_diagnostic): Now macro. (diagnostic_set_info): Declare. * diagnostic.c (report_problematic_module): Rename to diagnostic_repor_current_module. (set_diagnostic_context): Remove. (count_error): Rename to diagnostic_error_count. (error_function_changed): Remove. (record_last_error_function): Likewise. (error_module_changed): Likewise. (record_last_error_module): Likewise. (context_as_prefix): Rename to diagnostic_build_prefix. (flush_diagnostic_buffer): Rename to diagnostic_flush_buffer. (diagnostic_set_info): New function. * objc/objc-act.c: #include diagnostic.h (error_with_ivar): Adjust call to count_error. (warn_with_method): Likewise. * objc/Make-lang.in (objc-act.o): Depend on diagnostic.h cp/ 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com> * error.c (cp_diagnostic_starter): Adjust call. (maybe_print_instantiation_context): Change prototype to take a 'diagnostic_info *'. (print_instantiation_full_context): Likewise. (print_instantiation_partial_context): Likewise. (cp_diagnostic_starter): Likewise. (cp_diagnostic_finalizer): Likewise. (cp_print_error_function): Likewise. (cp_printer): Take a secondary parameter as a 'text_info *'. Remove output_state savings. Adjust calls. f/ 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com> * bad.c (ffebad_start_): Adjust call to count_error. * Make-lang.in (f/bad.o): Depend on diagnostic.h * bad.c: #include diagnostic.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54291 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (diagnostic_count): Move from output_buffer togdr2002-06-031-13/+10
| | | | | | | | diagnostic_context. (diagnostic_kind_count): Adjust definition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54218 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (struct diagnostic_context): Add new membergdr2002-06-021-3/+3
| | | | | | | | | | | | internal_error. (internal_error_function): Remove declaration. * diagnostic.c (internal_error_function): Remove definition.. (internal_error): Adjust use. ada/ * misc.c (gnat_init): Adjust setting of internal_error_function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54179 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (output_buffer_state): Redefine.gdr2002-04-141-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | (output_format_decoder): New macro. (output_prefixing_rule): Likewise. (output_line_cutoff): Likewise. (diagnostic_format_decoder): Adjust. (diagnostic_prefixing_rule): Likewise. (diagnostic_line_cutoff): Likewise. (diagnostic_state): Likewise. (diagnostic_kind_count): Likewise. (diagnostic_buffer): Now a macro. * diagnostic.c (diagnostic_buffer): Remove definition. (output_is_line_wrapping): Adjust. (set_real_maximum_length): Likewise. (output_set_maximum_length): Likewise. (init_output_buffer): Likewise. (lhd_print_error_function): Likewise. (output_do_verbatim): Likewise. cp/ * error.c (cxx_print_error_function): Adjust call to macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52307 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c (print_error_function): Remove.neil2002-03-311-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (default_print_error_function): Rename. (report_error_function): Update. * diagnostic.h (print_error_function): Remove. (default_print_error_function): Remove. * langhooks-def.h (struct diagnostic_context): Predeclare. (lhd_print_error_function, LANG_HOOKS_PRINT_ERROR_FUNCTION): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct diagnostic context): Predeclare. (struct lang_hooks): New hook. cp: * Make-lang.in (error.o): Update. * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. * cp-tree.h (struct diagnostic_context): Predeclare. (cxx_print_error_function): New. * error.c: Include langhooks-def.h. (lang_print_error_function): Rename. Update. (init_error): Don't set hook. f: * com.c (lang_print_error_function): Rename. (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. (ffe_init): Don't set hook. java: * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. (java_dummy_print): Remove. (lang_print_error): Rename. Exit early if inhibiting output. (inhibit_error_printing_function): New. (java_init): Don't set hook. (lang_init_source): Use new boolean. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51672 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h: Update copyright date.grahams2002-01-071-3/+3
| | | | | | | | (output_buffer_state): Add perenthesis. (output_buffer_format_args): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48596 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4,jsm282001-10-281-1/+1
| | | | | | | | | | | | ChangeLog.5, ChangeLog, ChangeLog.lib, FSFChangeLog.10, ONEWS, c-common.c, caller-save.c, cfg.c, cfgcleanup.c, cfgrtl.c, collect2.c, df.h, diagnostic.h, final.c, gcse.c, gthr.h, haifa-sched.c, jump.c, local-alloc.c, profile.c, protoize.c, regmove.c, reload1.c, rtlanal.c, sched-vis.c, ssa.c, stmt.c, system.h, toplev.c: Fix spelling errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46580 138bc75d-0d04-0410-961f-82ee72b054a4
* * calls.c: Fix formatting.kazu2001-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c: Likewise. * cfgcleanup.c: Likewise. * combine.c: Likewise. * cppfiles.c: Likewise. * cpplib.c: Likewise. * cppmacro.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * dwarf2out.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * integrate.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reload1.c: Likewise. * reload.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * stmt.c: Likewise. * toplev.c: Likewise. * varasm.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46182 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h: Fix comment formatting.kazu2001-10-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * c-dump.c: Likewise. * cfg.c: Likewise. * diagnostic.h: Likewise. * except.c: Likewise. * gcc.h: Likewise. * gcov-io.h: Likewise. * genattrtab.c: Likewise. * output.h: Likewise. * predict.h: Likewise. * reload1.c: Likewise. * reload.h: Likewise. * resource.h: Likewise. * scan.h: Likewise. * system.h: Likewise. * tree.h: Likewise. * tree-inline.c: Likewise. * tsystem.h: Likewise. * varasm.c: Likewise. * xcoffout.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46122 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,gerald2001-08-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45105 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (diagnostic_format_decoder): Parenthesize macro ↵grahams2001-08-081-4/+4
| | | | | | | | | | | parameter. (diagnostic_prefixing_rule): Likewise. (diagnostic_line_cutoff): Likewise. (diagnostic_kind_count): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44711 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c (default_print_error_function): Tweak.gdr2001-06-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (report_error_function): Likewise. * toplev.h (default_print_error_function): Move to... * diagnostic.h: ...here. Add a `diagnostic_context *' parameter. * tree.h (print_error_function): Move to... * diagnostic.h: ...here. Add a `diagnostic_context *' parameter. ch/ * lang.c: #include diagnostic.h (chill_print_error_function): Add a dummy `diagnostic_context *'. * Makefile.in (lang.o): Depend on diagnostic.h cp/ * error.c (lang_print_error_function): Add a `diagnostic_context *' parameter. Tweak. f/ * Make-lang.in (f/com.o): Depend on diagnostic.h * com.c: #include diagnostic.h (lang_print_error_function): Take a 'diagnostic_context *'. java/ * lang.c: #include diagnostic.h (lang_print_error): Add a `diagnostic_context *' parameter. (java_dummy_print): Likewise. * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43638 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-06-27 Gabriel Dos Reis <gdr@codesourcery.com>gdr2001-06-271-18/+61
| | | | | | | | | | * diagnostic.h: Add documentation. Make macros polymorphic. * diagnostic.c (ideal_line_wrap_cutoff): Remove definition. Replace with diagnostic_line_cutoff. (prefixing_policy): Remove. Replace with diagnostic_prefixing_rule. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43616 138bc75d-0d04-0410-961f-82ee72b054a4
* * toplev.c (decode_f_option): Adjust setting.gdr2001-06-261-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (toplev_main): Call diagnostic_initialize. Remove call to reshape_diagnostic_buffer._ * diagnostic.h (struct output_buffer): Add new field format_decoder. (diagnostic_format_decoder): New macro. (diagnostic_prefixing_rule): Likewise. (diagnostic_line_cutoff): Likewise. (set_message_prefixing_rule): Remove. * diagnostic.c (lang_printer): Remove. (diagnostic_message_length_per_line): Likewise. (current_prefixing_rule): Likewise. (initialize_diagnostics): Rename to... (diagnostic_initialize): ...this. Tweak. (default_initialize_buffer): Remove. (reshape_diagnostic_buffer): Likewise. (init_output_buffer): Adjust prefixing rule setting. (output_format): Use format_decoder from the output_buffer. * c-lang.c (c_init): Adjust tree formatter setting. cp/ * error.c (init_error): Adjust settings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43588 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.h (struct diagnostic_context): Add new field.gdr2001-06-261-3/+6
| | | | | | | | | | | | | | | | | | | | (lang_diagnostic_starter, lang_diagnostic_finalizer): Remove declaratons. (global_dc): Declare. * diagnostic.c (global_diagnostic_context): New variable. (global_output_buffer): Remove. (global_dc): Define. (lang_diagnostic_starter, lang_diagnostic_finalizer): Remove definitions. (initialize_diagnostics): Adjust initialization. (set_diagnostic_context): Adjust setting. cp/ * error.c (init_error): Adjust settings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43581 138bc75d-0d04-0410-961f-82ee72b054a4