From a13812e2c83b6cc3fcc324ca3c855af68d31daa6 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 25 May 2010 14:01:45 +0100 Subject: diagnostic.c: Don't include plugin.h. * diagnostic.c: Don't include plugin.h. (diagnostic_report_diagnostic): Don't handle plugins specially here. Pass context to internal_error callback. * diagnostic.h (struct diagnostic_context): Add context parameter to internal_error callback. * plugin.c (warn_if_plugins, plugins_internal_error_function): New. * plugin.h (struct diagnostic_context): Declare. (warn_if_plugins, plugins_internal_error_function): Declare. * toplev.c (general_init): Set global_dc->internal_error. * Makefile.in (diagnostic.o): Update dependencies. ada: * gcc-interface/misc.c (internal_error_function): Add context parameter. Use it to access show_column flag and instead of using global_dc. Call warn_if_plugins. * gcc-interface/Make-lang.in (ada/misc.o): Update dependencies. From-SVN: r159819 --- gcc/diagnostic.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'gcc/diagnostic.c') diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 7757ace..c16ec7c 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -32,7 +32,6 @@ along with GCC; see the file COPYING3. If not see #include "intl.h" #include "diagnostic.h" #include "opts.h" -#include "plugin.h" #define pedantic_warning_kind(DC) \ ((DC)->pedantic_errors ? DK_ERROR : DK_WARNING) @@ -380,14 +379,6 @@ diagnostic_report_diagnostic (diagnostic_context *context, context->lock++; - if (diagnostic->kind == DK_ICE && plugins_active_p ()) - { - fnotice (stderr, "*** WARNING *** there are active plugins, do not report" - " this as a bug unless you can reproduce it without enabling" - " any plugins.\n"); - dump_active_plugins (stderr); - } - if (diagnostic->kind == DK_ICE) { #ifndef ENABLE_CHECKING @@ -405,7 +396,8 @@ diagnostic_report_diagnostic (diagnostic_context *context, } #endif if (context->internal_error) - (*context->internal_error) (diagnostic->message.format_spec, + (*context->internal_error) (context, + diagnostic->message.format_spec, diagnostic->message.args_ptr); } ++diagnostic_kind_count (context, diagnostic->kind); -- cgit v1.1