From 2098fe9ed59d4342ee62ae9f796242a0683d8643 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 3 May 2005 21:36:13 -0400 Subject: common.opt (fdiagnostics-show-option): No variable is needed. * common.opt (fdiagnostics-show-option): No variable is needed. * diagnostic.h (diagnostic_context): Add show_option_requested flag. * diagnostic.c (diagnostic_initialize): Initialize show_option_requested. (diagnostic_report_diagnostic): Test for enabled diagnostics here. Save and restore original message format. Use flag in context instead of global. (warning): Don't test for enabled warnings here. * opts.c (common_handle_option): Handle -fdiagnostics-show-option here. From-SVN: r99204 --- gcc/diagnostic.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/diagnostic.h') diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 37cded711..5bbb135 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -73,6 +73,10 @@ struct diagnostic_context /* True if it has been requested that warnings be treated as errors. */ bool warning_as_error_requested; + /* True if we should print the command line option which controls + each diagnostic, if known. */ + bool show_option_requested; + /* True if we should raise a SIGABRT on errors. */ bool abort_on_error; -- cgit v1.1