summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 8d012491577..c0648cd53b2 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "langhooks-def.h"
#include "opts.h"
+#include "plugin.h"
#define pedantic_warning_kind() (flag_pedantic_errors ? DK_ERROR : DK_WARNING)
#define permissive_error_kind() (flag_permissive ? DK_WARNING : DK_ERROR)
@@ -371,6 +372,17 @@ diagnostic_report_diagnostic (diagnostic_context *context,
context->lock++;
+ if ((diagnostic->kind == DK_ERROR
+ || diagnostic->kind == DK_WARNING
+ || 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