From 9804f5fb8bc09df63c51d2e2d0fa4d4abddd5f2b Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 12 May 2003 18:32:18 +0000 Subject: diagnostic.c (diagnostic_for_decl): Take a diagnostic_context argument. * 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 --- gcc/objc/objc-act.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'gcc/objc') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 5cb7c1db6f2..dd6b87e15b0 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -3539,10 +3539,6 @@ error_with_ivar (message, decl, rawdecl) tree decl; tree rawdecl; { - diagnostic_count_diagnostic (global_dc, DK_ERROR); - - diagnostic_report_current_function (global_dc); - error ("%H%s `%s'", &DECL_SOURCE_LOCATION (decl), message, gen_declaration (rawdecl, errbuf)); @@ -7108,11 +7104,6 @@ warn_with_method (message, mtype, method) int mtype; tree method; { - if (!diagnostic_count_diagnostic (global_dc, DK_WARNING)) - return; - - diagnostic_report_current_function (global_dc); - /* Add a readable method name to the warning. */ warning ("%H%s `%c%s'", &DECL_SOURCE_LOCATION (method), message, mtype, gen_method_decl (method, errbuf)); -- cgit v1.2.1