diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-03 17:55:46 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-03 17:55:46 +0000 |
commit | efb9d9ee8e1478917ccbfa1e47447d8dfb63953c (patch) | |
tree | cff3402fafefe694afbb81cbc70f93161517f19e /gcc/c-decl.c | |
parent | a869d17ed1730aabcda5c3733c3518267ba19628 (diff) | |
download | gcc-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/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index c8516c7501b..e7ac0d3690d 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -6011,8 +6011,8 @@ store_parm_decls_oldstyle (tree fndecl, const struct c_arg_info *arg_info) gcc_assert (TREE_CODE (b->decl) != PARM_DECL || !DECL_WEAK (b->decl)); #endif - if (warn_old_style_definition && !in_system_header) - warning (0, "%Jold-style function definition", fndecl); + if (!in_system_header) + warning (OPT_Wold_style_definition, "%Jold-style function definition", fndecl); /* Match each formal parameter name with its declaration. Save each decl in the appropriate TREE_PURPOSE slot of the parmids chain. */ |