summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-03 17:55:46 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-03 17:55:46 +0000
commitefb9d9ee8e1478917ccbfa1e47447d8dfb63953c (patch)
treecff3402fafefe694afbb81cbc70f93161517f19e /gcc/toplev.c
parenta869d17ed1730aabcda5c3733c3518267ba19628 (diff)
downloadgcc-efb9d9ee8e1478917ccbfa1e47447d8dfb63953c.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99169 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index c7e5440504a..9f1bb79e8f3 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1360,7 +1360,7 @@ print_switch_values (FILE *file, int pos, int max,
for (j = 0; j < cl_options_count; j++)
if ((cl_options[j].flags & CL_REPORT)
- && option_enabled (&cl_options[j]) > 0)
+ && option_enabled (j) > 0)
pos = print_single_switch (file, pos, max, indent, sep, term,
"", cl_options[j].opt_text);