aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-05-03 13:55:46 -0400
committerDJ Delorie <dj@gcc.gnu.org>2005-05-03 13:55:46 -0400
commitccf08a6ed7ade866dab79e1c0dc853bae887f9e2 (patch)
treecff3402fafefe694afbb81cbc70f93161517f19e /gcc/opts.c
parent6ceec5933a1159c7b5595047ee435343f58ed038 (diff)
downloadgcc-ccf08a6ed7ade866dab79e1c0dc853bae887f9e2.zip
gcc-ccf08a6ed7ade866dab79e1c0dc853bae887f9e2.tar.gz
gcc-ccf08a6ed7ade866dab79e1c0dc853bae887f9e2.tar.bz2
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
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 5c09450..4311f4c 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1400,8 +1400,9 @@ wrap_help (const char *help, const char *item, unsigned int item_width)
a simple on-off switch. */
int
-option_enabled (const struct cl_option *option)
+option_enabled (int opt_idx)
{
+ const struct cl_option *option = &(cl_options[opt_idx]);
if (option->flag_var)
switch (option->var_cond)
{