From ccf08a6ed7ade866dab79e1c0dc853bae887f9e2 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 3 May 2005 13:55:46 -0400 Subject: c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery decide if the warning will be printed. * c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery decide if the warning will be printed. * calls.c (expand_call): Likewise. * function.c (init-function_start): Likewise. * common.opt (-fdiagnostics-show-option): New. * opts.c (option_enabled): Accept the option index instead of a pointer to the option descriptor. * opts.h (option_enabled): Likewise. * toplev.c (print_switch_values): Pass option index, not option descriptor. * diagnostic.h (diagnostic_info): Add option_index. * diagnostic.c: Include opts.h. (diagnostic_set_info): Initialize option_index. (diagnostic_report_diagnostic): Amend option name if appropriate. (warning): Check to see if the specified warning is enabled. Store option index. * doc/invoke.texi (-fdiagnostics-show-options): Document. From-SVN: r99169 --- gcc/doc/invoke.texi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/doc/invoke.texi') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 2bb8744..2de05a8 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -206,7 +206,8 @@ Objective-C and Objective-C++ Dialects}. @item Language Independent Options @xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}. @gccoptlist{-fmessage-length=@var{n} @gol --fdiagnostics-show-location=@r{[}once@r{|}every-line@r{]}} +-fdiagnostics-show-location=@r{[}once@r{|}every-line@r{]}} @gol +-fdiagnostics-show-options @item Warning Options @xref{Warning Options,,Options to Request or Suppress Warnings}. @@ -2090,6 +2091,13 @@ messages reporter to emit the same source location information (as prefix) for physical lines that result from the process of breaking a message which is too long to fit on a single line. +@item -fdiagnostics-show-options +@opindex fdiagnostics-show-options +This option instructs the diagnostic machinery to add text to each +diagnostic emitted, which indicates which command line option directly +controls that diagnostic, when such an option is known to the +diagnostic machinery. + @end table @node Warning Options -- cgit v1.1