summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-26 22:06:56 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-26 22:06:56 +0000
commit16b4d5bbcc6fedad04a5dd8370b774fb94d1fa0e (patch)
treedc7e9199bbd5f92c7eed38be3754a171070f0408 /gcc/diagnostic.c
parent32f1f35b2efa25d537e6ef7d3bfde8c329e4710c (diff)
downloadgcc-16b4d5bbcc6fedad04a5dd8370b774fb94d1fa0e.tar.gz
2010-02-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
* diagnostic.c (diagnostic_initialize): Update. (diagnostic_report_diagnostic): Test inhibit_notes_p for informative notes. * diagnostic.h (diagnostic_context): New bool inhibit_notes_p. (diagnostic_inhibit_notes): New. * toplev.c (process_options): inhibit notes with -fcompare-debug. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157100 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 28217a7cc78..4322d654935 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -109,6 +109,7 @@ diagnostic_initialize (diagnostic_context *context)
context->last_module = 0;
context->last_function = NULL;
context->lock = 0;
+ context->inhibit_notes_p = false;
}
/* Initialize DIAGNOSTIC, where the message MSG has already been
@@ -317,11 +318,11 @@ diagnostic_report_diagnostic (diagnostic_context *context,
&& !diagnostic_report_warnings_p (location))
return false;
- if (diagnostic->kind == DK_NOTE && flag_compare_debug)
- return false;
-
if (diagnostic->kind == DK_PEDWARN)
diagnostic->kind = pedantic_warning_kind ();
+
+ if (diagnostic->kind == DK_NOTE && context->inhibit_notes_p)
+ return false;
if (context->lock > 0)
{