aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-11-10 22:35:13 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2010-11-10 22:35:13 +0000
commitd5478783983705a1044961df3c3d59f2ff3d52dc (patch)
treef57929816077a497be812af640de16726bdb0e24 /gcc/gcc.c
parent8e7a6ed68c18117b0b248bccd932b5a477d2f8c2 (diff)
downloadgcc-d5478783983705a1044961df3c3d59f2ff3d52dc.zip
gcc-d5478783983705a1044961df3c3d59f2ff3d52dc.tar.gz
gcc-d5478783983705a1044961df3c3d59f2ff3d52dc.tar.bz2
common.opt (flag_excess_precision_cmdline, [...]): New Variable declarations.
* common.opt (flag_excess_precision_cmdline, flag_generate_lto, warn_larger_than, larger_than_size, warn_frame_larger_than, frame_larger_than_size, flag_gen_aux_info, flag_shlib, default_visibility, flag_tls_default): New Variable declarations. (aux-info, auxbase, dumpbase, dumpdir, falign-functions=, falign-jumps=, falign-labels=, falign-loops=, o, v): Use Var. (v): Declare as Common and document here. * flags.h (default_visibility, flag_generate_lto, warn_larger_than, larger_than_size, warn_frame_larger_than, frame_larger_than_size, flag_gen_aux_info, flag_pedantic_errors, flag_shlib, flag_excess_precision_cmdline): Remove. (set_Wstrict_aliasing): Update prototype. * gcc.c (verbose_flag): Remove. (driver_handle_option): Add diagnostic_context parameter. Don't handle OPT_v explicitly here. Set verbose_flag to 1 rather than incrementing it. * opts-common.c (handle_option): Pass dc to handler. * opts.c (warn_larger_than, larger_than_size, warn_frame_larger_than, frame_larger_than_size, default_visibility): Remove. (common_handle_option): Add diagnostic_context parameter. (set_fast_math_flags, set_unsafe_math_optimizations_flags): Add gcc_options parameters. (lang_handle_option, target_handle_option, read_cmdline_options, decode_options): Add diagnostic_context parameters. (finish_options): Access option state through opts pointer where possible. (common_handle_option): Access option state through opts pointer where possible. Do not set local static variable verbose. Do not explicitly handle OPT_v, OPT_Wstrict_aliasing_, OPT_Wstrict_overflow_, OPT_Wunused, OPT_auxbase, OPT_dumpbase, OPT_dumpdir, OPT_falign_functions_, OPT_falign_jumps_, OPT_falign_labels_, OPT_falign_loops_, OPT_fira_verbose_, OPT_o or OPT_fwhopr_. Do not explicitly set .opt file variables for OPT_aux_info or OPT_pedantic_errors. Use dc for diagnostic context. (set_Wstrict_aliasing): Add gcc_options parameter. * opts.h (struct cl_option_handler_func): Add diagnostic_context parameter to handler. (decode_options): Add diagnostic_context parameter. * toplev.c (dump_base_name, dump_dir_name, aux_base_name, asm_file_name, flag_generate_lto, flag_gen_aux_info, aux_info_file_name, flag_shlib, flag_tls_default, flag_excess_precision_cmdline, flag_pedantic_errors): Remove. (toplev_main): Pass global_dc to decode_options. * toplev.h (dump_base_name, dump_dir_name, aux_base_name, aux_info_file_name, asm_file_name): Remove. * tree.h (flag_tls_default): Remove. c-family: * c-common.c (parse_optimize_options): Pass global_dc to decode_options. * c-opts.c (c_common_handle_option): Pass &global_options to set_Wstrict_aliasing. * c.opt (v): Don't mark Common or document here. fortran: * cpp.c (asm_file_name): Don't declare here. objc: * objc-act.c (dump_base_name): Don't declare here. From-SVN: r166565
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index c016a5c..5884f38 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -114,10 +114,6 @@ static int print_help_list;
static int print_version;
-/* Flag indicating whether we should print the command and arguments */
-
-static int verbose_flag;
-
/* Flag indicating whether we should ONLY print the command and
arguments (like verbose_flag) without executing the command.
Displayed arguments are quoted so that the generated command
@@ -3145,7 +3141,8 @@ driver_handle_option (struct gcc_options *opts,
struct gcc_options *opts_set,
const struct cl_decoded_option *decoded,
unsigned int lang_mask ATTRIBUTE_UNUSED, int kind,
- const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED)
+ const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED,
+ diagnostic_context *dc)
{
size_t opt_index = decoded->opt_index;
const char *arg = decoded->arg;
@@ -3157,6 +3154,7 @@ driver_handle_option (struct gcc_options *opts,
gcc_assert (opts == &global_options);
gcc_assert (opts_set == &global_options_set);
gcc_assert (kind == DK_UNSPECIFIED);
+ gcc_assert (dc == global_dc);
switch (opt_index)
{
@@ -3421,7 +3419,7 @@ driver_handle_option (struct gcc_options *opts,
is intended for use in shell scripts to capture the
driver-generated command line. */
verbose_only_flag++;
- verbose_flag++;
+ verbose_flag = 1;
do_save = false;
break;
@@ -3456,10 +3454,6 @@ driver_handle_option (struct gcc_options *opts,
validated = true;
break;
- case OPT_v: /* Print our subcommands and print versions. */
- verbose_flag++;
- break;
-
case OPT_x:
spec_lang = arg;
if (!strcmp (spec_lang, "none"))