diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2010-02-26 22:06:56 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2010-02-26 22:06:56 +0000 |
commit | 0e94b75085af60341759c30fb522c9438c4b18b8 (patch) | |
tree | dc7e9199bbd5f92c7eed38be3754a171070f0408 /gcc/diagnostic.c | |
parent | 7e1542b921b63aea61cc239be5eeeb632631a5b9 (diff) | |
download | gcc-0e94b75085af60341759c30fb522c9438c4b18b8.tar.gz |
diagnostic.c (diagnostic_initialize): Update.
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.
From-SVN: r157100
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 7 |
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) { |