diff options
author | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-05 19:35:45 +0000 |
---|---|---|
committer | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-05 19:35:45 +0000 |
commit | 25e2ffe1cbed24a0896b73bf2ca85571160f4cb1 (patch) | |
tree | c3ef54e07296b12dc1226be91d252727972d938c /gcc/rtl-error.c | |
parent | 73d607739f2b0ae6f3d3408bbccfbf7e68bd1585 (diff) | |
download | gcc-25e2ffe1cbed24a0896b73bf2ca85571160f4cb1.tar.gz |
* toplev.h (report_error_function): Remove.
* 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
Diffstat (limited to 'gcc/rtl-error.c')
-rw-r--r-- | gcc/rtl-error.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/rtl-error.c b/gcc/rtl-error.c index 560d54e89c9..2b660c94fb7 100644 --- a/gcc/rtl-error.c +++ b/gcc/rtl-error.c @@ -32,7 +32,8 @@ Boston, MA 02111-1307, USA. */ #include "diagnostic.h" static void file_and_line_for_asm PARAMS ((rtx, const char **, int *)); -static void diagnostic_for_asm PARAMS ((rtx, const char *, va_list *, int)); +static void diagnostic_for_asm PARAMS ((rtx, const char *, va_list *, + diagnostic_t)); /* Figure file and line of the given INSN. */ static void @@ -74,18 +75,18 @@ file_and_line_for_asm (insn, pfile, pline) of the insn INSN. This is used only when INSN is an `asm' with operands, and each ASM_OPERANDS records its own source file and line. */ static void -diagnostic_for_asm (insn, msg, args_ptr, warn) +diagnostic_for_asm (insn, msg, args_ptr, kind) rtx insn; const char *msg; va_list *args_ptr; - int warn; + diagnostic_t kind; { - diagnostic_context dc; + diagnostic_info diagnostic; - set_diagnostic_context (&dc, msg, args_ptr, NULL, 0, warn); - file_and_line_for_asm (insn, &diagnostic_file_location (&dc), - &diagnostic_line_location (&dc)); - report_diagnostic (&dc); + diagnostic_set_info (&diagnostic, msg, args_ptr, NULL, 0, kind); + file_and_line_for_asm (insn, &diagnostic.location.file, + &diagnostic.location.line); + report_diagnostic (&diagnostic); } void @@ -95,7 +96,7 @@ error_for_asm VPARAMS ((rtx insn, const char *msgid, ...)) VA_FIXEDARG (ap, rtx, insn); VA_FIXEDARG (ap, const char *, msgid); - diagnostic_for_asm (insn, msgid, &ap, /* warn = */ 0); + diagnostic_for_asm (insn, msgid, &ap, DK_ERROR); VA_CLOSE (ap); } @@ -106,7 +107,7 @@ warning_for_asm VPARAMS ((rtx insn, const char *msgid, ...)) VA_FIXEDARG (ap, rtx, insn); VA_FIXEDARG (ap, const char *, msgid); - diagnostic_for_asm (insn, msgid, &ap, /* warn = */ 1); + diagnostic_for_asm (insn, msgid, &ap, DK_WARNING); VA_CLOSE (ap); } |