diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-05-11 12:23:50 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-05-11 12:23:50 +0000 |
commit | 7d5a5747fc5ffbd86d1da0e2cff9823f0446a907 (patch) | |
tree | 1a38b4f6902dc5e5cc35971539a25051202efa2e /gcc/opts.c | |
parent | 319e6439f592285e7d931c47285c363cca113788 (diff) | |
download | gcc-7d5a5747fc5ffbd86d1da0e2cff9823f0446a907.zip gcc-7d5a5747fc5ffbd86d1da0e2cff9823f0446a907.tar.gz gcc-7d5a5747fc5ffbd86d1da0e2cff9823f0446a907.tar.bz2 |
re PR c/53063 (encode group options in the .opt files)
2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 53063
gcc/
* doc/options.texi (EnabledBy): Document
* opts.c: Include opts.h and options.h before tm.h.
(finish_options): Do not handle some sub-options here...
(common_handle_option): ... instead call common_handle_option_auto here.
* optc-gen.awk: Handle EnabledBy.
* opth-gen.awk: Declare common_handle_option_auto.
* common.opt (Wuninitialized): Use EnabledBy. Delete Init.
(Wmaybe-uninitialized): Likewise.
(Wunused-but-set-variable): Likewise.
(Wunused-function): Likewise.
(Wunused-label): Likewise.
(Wunused-value): Likewise.
(Wunused-variable): Likewise.
* opt-read.awk: Create opt_numbers array.
ada/
* gcc-interface/misc.c (gnat_parse_file): Move before ...
(gnat_handle_option): ... this. Use handle_generated_option.
c-family/
* c-opts.c (c_common_handle_option): Use handle_generated_option
to enable sub-options.
fortran/
* options.c: Include diagnostics.h instead of
diagnostics-core.h.
(set_Wall): Do not see warn_unused here.
(gfc_handle_option): Set it here using handle_generated_option.
From-SVN: r187403
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 30 |
1 files changed, 7 insertions, 23 deletions
@@ -1,5 +1,7 @@ /* Command line option handling. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, + 2012 + Free Software Foundation, Inc. Contributed by Neil Booth. @@ -23,11 +25,11 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "intl.h" #include "coretypes.h" +#include "opts.h" +#include "options.h" #include "tm.h" /* For STACK_CHECK_BUILTIN, STACK_CHECK_STATIC_BUILTIN, DEFAULT_GDB_EXTENSIONS, DWARF2_DEBUGGING_INFO and DBX_DEBUGGING_INFO. */ -#include "opts.h" -#include "options.h" #include "flags.h" #include "params.h" #include "diagnostic.h" @@ -815,33 +817,18 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, opts->x_param_values, opts_set->x_param_values); /* This replaces set_Wunused. */ - if (opts->x_warn_unused_function == -1) - opts->x_warn_unused_function = opts->x_warn_unused; - if (opts->x_warn_unused_label == -1) - opts->x_warn_unused_label = opts->x_warn_unused; /* Wunused-parameter is enabled if both -Wunused -Wextra are enabled. */ if (opts->x_warn_unused_parameter == -1) opts->x_warn_unused_parameter = (opts->x_warn_unused && opts->x_extra_warnings); - if (opts->x_warn_unused_variable == -1) - opts->x_warn_unused_variable = opts->x_warn_unused; /* Wunused-but-set-parameter is enabled if both -Wunused -Wextra are enabled. */ if (opts->x_warn_unused_but_set_parameter == -1) opts->x_warn_unused_but_set_parameter = (opts->x_warn_unused && opts->x_extra_warnings); - if (opts->x_warn_unused_but_set_variable == -1) - opts->x_warn_unused_but_set_variable = opts->x_warn_unused; - if (opts->x_warn_unused_value == -1) - opts->x_warn_unused_value = opts->x_warn_unused; - /* Wunused-local-typedefs is enabled by -Wunused or -Wall. */ if (opts->x_warn_unused_local_typedefs == -1) opts->x_warn_unused_local_typedefs = opts->x_warn_unused; - - /* This replaces set_Wextra. */ - if (opts->x_warn_uninitialized == -1) - opts->x_warn_uninitialized = opts->x_extra_warnings; } #define LEFT_COLUMN 27 @@ -1745,11 +1732,6 @@ common_handle_option (struct gcc_options *opts, /* No-op. Used by the driver and passed to us because it starts with f.*/ break; - case OPT_Wuninitialized: - /* Also turn on maybe uninitialized warning. */ - opts->x_warn_maybe_uninitialized = value; - break; - default: /* If the flag was handled in a standard way, assume the lack of processing here is intentional. */ @@ -1757,6 +1739,8 @@ common_handle_option (struct gcc_options *opts, break; } + common_handle_option_auto (opts, opts_set, decoded, lang_mask, kind, + loc, handlers, dc); return true; } |