Commit d5478783 by Joseph Myers Committed by Joseph Myers

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
parent 8e7a6ed6
2010-11-10 Joseph Myers <joseph@codesourcery.com>
* 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.
2010-11-10 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (sparc_delegitimize_address): New function.
2010-11-10 Joseph Myers <joseph@codesourcery.com>
* 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.
2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
PR target/44981
......
......@@ -7804,7 +7804,7 @@ parse_optimize_options (tree args, bool attr_p)
&decoded_options,
&decoded_options_count);
decode_options (&global_options, &global_options_set,
decoded_options, decoded_options_count);
decoded_options, decoded_options_count, global_dc);
targetm.override_options_after_change();
......
......@@ -451,7 +451,7 @@ c_common_handle_option (size_t scode, const char *arg, int value,
warn_sequence_point = value; /* Was C only. */
warn_switch = value;
if (warn_strict_aliasing == -1)
set_Wstrict_aliasing (value);
set_Wstrict_aliasing (&global_options, value);
warn_address = value;
if (warn_strict_overflow == -1)
warn_strict_overflow = value;
......
......@@ -1213,8 +1213,8 @@ C ObjC C++ ObjC++ Var(flag_undef)
Do not predefine system-specific and GCC-specific macros
v
Common C ObjC C++ ObjC++
Enable verbose output
C ObjC C++ ObjC++
; Documented in common.opt
w
C ObjC C++ ObjC++
......
......@@ -62,6 +62,49 @@ int *param_values
Variable
enum fp_contract_mode flag_fp_contract_mode = FP_CONTRACT_FAST
; The excess precision specified on the command line, or defaulted by
; the front end.
Variable
enum excess_precision flag_excess_precision_cmdline = EXCESS_PRECISION_DEFAULT
; Nonzero if we should write GIMPLE bytecode for link-time optimization.
Variable
int flag_generate_lto
; True to warn about any objects definitions whose size is larger
; than N bytes. Also want about function definitions whose returned
; values are larger than N bytes, where N is 'larger_than_size'.
Variable
bool warn_larger_than
Variable
HOST_WIDE_INT larger_than_size
; True to warn about any function whose frame size is larger
; than N bytes.
Variable
bool warn_frame_larger_than
Variable
HOST_WIDE_INT frame_larger_than_size
; Nonzero means we should be saving declaration info into a .X file.
Variable
int flag_gen_aux_info = 0
; Nonzero if we are compiling code for a shared library, zero for
; executable.
Variable
int flag_shlib
; The default visibility for all symbols (unless overridden).
Variable
enum symbol_visibility default_visibility = VISIBILITY_DEFAULT
; Set to the default thread-local storage (tls) model to use.
Variable
enum tls_model flag_tls_default = TLS_MODEL_GLOBAL_DYNAMIC
###
Driver
......@@ -522,14 +565,14 @@ Xpreprocessor
Driver Separate
aux-info
Common Separate
Common Separate Var(aux_info_file_name)
-aux-info <file> Emit declaration information into <file>
aux-info=
Common Joined Alias(aux-info)
auxbase
Common Separate RejectDriver
Common Separate RejectDriver Var(aux_base_name)
auxbase-strip
Common Separate RejectDriver
......@@ -545,11 +588,11 @@ Common Joined
-d<letters> Enable dumps from specific passes of the compiler
dumpbase
Common Separate
Common Separate Var(dump_base_name)
-dumpbase <file> Set the file basename to be used for dumps
dumpdir
Common Separate
Common Separate Var(dump_dir_name)
-dumpdir <dir> Set the directory name to be used for dumps
dumpmachine
......@@ -591,28 +634,28 @@ Common Report Var(align_functions,0) Optimization UInteger
Align the start of functions
falign-functions=
Common RejectNegative Joined UInteger
Common RejectNegative Joined UInteger Var(align_functions)
falign-jumps
Common Report Var(align_jumps,0) Optimization UInteger
Align labels which are only reached by jumping
falign-jumps=
Common RejectNegative Joined UInteger
Common RejectNegative Joined UInteger Var(align_jumps)
falign-labels
Common Report Var(align_labels,0) Optimization UInteger
Align all labels
falign-labels=
Common RejectNegative Joined UInteger
Common RejectNegative Joined UInteger Var(align_labels)
falign-loops
Common Report Var(align_loops,0) Optimization UInteger
Align the start of loops
falign-loops=
Common RejectNegative Joined UInteger
Common RejectNegative Joined UInteger Var(align_loops)
fargument-alias
Common Ignore
......@@ -1928,7 +1971,7 @@ nostdlib
Driver
o
Common Driver Joined Separate MissingArgError(missing filename after %qs)
Common Driver Joined Separate Var(asm_file_name) MissingArgError(missing filename after %qs)
-o <file> Place output into <file>
p
......@@ -1943,7 +1986,7 @@ Common Var(pedantic)
Issue warnings needed for strict compliance to the standard
pedantic-errors
Common
Common Var(flag_pedantic_errors)
Like -pedantic but issue them as errors
pg
......@@ -2003,7 +2046,8 @@ Driver
; C option, but driver must not handle as "-u ndef".
v
Driver
Common Driver Var(verbose_flag)
Enable verbose output
version
Common Var(version_flag) RejectDriver
......
......@@ -49,9 +49,6 @@ extern bool use_gnu_debug_info_extensions;
an actual variable not a macro. */
extern int flag_compare_debug;
/* The default visibility for all symbols (unless overridden). */
extern enum symbol_visibility default_visibility;
/* Global visibility options. */
extern struct visibility_flags visibility_options;
......@@ -62,31 +59,14 @@ extern struct visibility_flags visibility_options;
extern bool in_lto_p;
/* Nonzero if we should write GIMPLE bytecode for link-time optimization. */
extern int flag_generate_lto;
/* Used to set the level of -Wstrict-aliasing, when no level is specified.
The external way to set the default level is to use
/* Used to set the level of -Wstrict-aliasing in OPTS, when no level
is specified. The external way to set the default level is to use
-Wstrict-aliasing=level.
ONOFF is assumed to take value 1 when -Wstrict-aliasing is specified,
and 0 otherwise. After calling this function, wstrict_aliasing will be
set to the default value of -Wstrict_aliasing=level. */
extern void set_Wstrict_aliasing (int onoff);
/* Nonzero means warn about any objects definitions whose size is larger
than N bytes. Also want about function definitions whose returned
values are larger than N bytes. The value N is in `larger_than_size'. */
extern bool warn_larger_than;
extern HOST_WIDE_INT larger_than_size;
/* Nonzero means warn about any function whose frame size is larger
than N bytes. */
extern bool warn_frame_larger_than;
extern HOST_WIDE_INT frame_larger_than_size;
extern void set_Wstrict_aliasing (struct gcc_options *opts, int onoff);
/* Nonzero for -dp: annotate the assembly with a comment describing the
pattern and alternative used. */
......@@ -99,28 +79,14 @@ extern int flag_print_asm_name;
extern int rtl_dump_and_exit;
/* Nonzero means we should save auxiliary info into a .X file. */
extern int flag_gen_aux_info;
/* True if printing into -fdump-final-insns= dump. */
extern bool final_insns_dump_p;
/* Nonzero means change certain warnings into errors.
Usually these are warnings about failure to conform to some standard. */
extern int flag_pedantic_errors;
/* Nonzero means make permerror produce warnings instead of errors. */
extern int flag_permissive;
/* Nonzero if we are compiling code for a shared library, zero for
executable. */
extern int flag_shlib;
/* -dA causes debug information to be produced in
the generated assembly code (to make it more readable). This option
is generally only of use to those who actually need to read the
......@@ -135,10 +101,6 @@ extern int flag_debug_asm;
extern int flag_next_runtime;
extern int flag_dump_rtl_in_asm;
/* The excess precision specified on the command line, or defaulted by
the front end. */
extern enum excess_precision flag_excess_precision_cmdline;
/* Other basic status info about current function. */
......
2010-11-10 Joseph Myers <joseph@codesourcery.com>
* cpp.c (asm_file_name): Don't declare here.
2010-11-10 Tobias Burnus <burnus@net-b.de>
PR fortran/46411
......
......@@ -115,12 +115,6 @@ gfc_cpp_option;
static cpp_options *cpp_option = NULL;
static cpp_reader *cpp_in = NULL;
/* Defined in toplev.c. */
extern const char *asm_file_name;
/* Encapsulates state used to convert a stream of cpp-tokens into
a text file. */
static struct
......
......@@ -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"))
......
2010-11-10 Joseph Myers <joseph@codesourcery.com>
* objc-act.c (dump_base_name): Don't declare here.
2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_add_dynamic_declaration_for_property): Do not
......
......@@ -414,9 +414,6 @@ static char *errbuf; /* Buffer for error diagnostics */
extern enum debug_info_type write_symbols;
/* Data imported from toplev.c. */
extern const char *dump_base_name;
static int flag_typed_selectors;
......
......@@ -751,7 +751,7 @@ handle_option (struct gcc_options *opts,
if (option->flags & handlers->handlers[i].mask)
{
if (!handlers->handlers[i].handler (opts, opts_set, decoded,
lang_mask, kind, handlers))
lang_mask, kind, handlers, dc))
return false;
else
handlers->post_handling_callback (decoded,
......
......@@ -165,7 +165,8 @@ struct cl_option_handler_func
struct gcc_options *opts_set,
const struct cl_decoded_option *decoded,
unsigned int lang_mask, int kind,
const struct cl_option_handlers *handlers);
const struct cl_option_handlers *handlers,
diagnostic_context *dc);
/* The mask that must have some bit in common with the flags for the
option for this particular handler to be used. */
......@@ -223,7 +224,8 @@ extern void decode_cmdline_options_to_array_default_mask (unsigned int argc,
extern void decode_options (struct gcc_options *opts,
struct gcc_options *opts_set,
struct cl_decoded_option *decoded_options,
unsigned int decoded_options_count);
unsigned int decoded_options_count,
diagnostic_context *dc);
extern int option_enabled (int opt_idx, void *opts);
extern bool get_option_state (struct gcc_options *, int,
struct cl_option_state *);
......
......@@ -140,18 +140,6 @@ const char *main_input_filename;
to optimize in process_options (). */
#define AUTODETECT_VALUE 2
/* Name to use as base of names for dump output files. */
const char *dump_base_name;
/* Directory used for dump output files. */
const char *dump_dir_name;
/* Name to use as a base for auxiliary output files. */
const char *aux_base_name;
/* Prefix for profile data files */
const char *profile_data_prefix;
......@@ -165,10 +153,6 @@ int rtl_dump_and_exit;
int flag_print_asm_name;
enum graph_dump_types graph_dump_format;
/* Name for output file of assembly code, specified with -o. */
const char *asm_file_name;
/* True if this is the lto front end. This is used to disable
gimple generation and lowering passes that are normally run on the
output of a front end. These passes must be bypassed for lto since
......@@ -176,10 +160,6 @@ const char *asm_file_name;
bool in_lto_p = false;
/* Nonzero if we should write GIMPLE bytecode for link-time optimization. */
int flag_generate_lto;
/* The FUNCTION_DECL for the function currently being compiled,
or 0 if between functions. */
tree current_function_decl;
......@@ -198,19 +178,6 @@ unsigned local_tick;
/* -f flags. */
/* Nonzero means we should be saving declaration info into a .X file. */
int flag_gen_aux_info = 0;
/* Specified name of aux-info file. */
const char *aux_info_file_name;
/* Nonzero if we are compiling code for a shared library, zero for
executable. */
int flag_shlib;
/* Generate code for GNU or NeXT Objective-C runtime environment. */
#ifdef NEXT_OBJC_RUNTIME
......@@ -219,19 +186,6 @@ int flag_next_runtime = 1;
int flag_next_runtime = 0;
#endif
/* Set to the default thread-local storage (tls) model to use. */
enum tls_model flag_tls_default = TLS_MODEL_GLOBAL_DYNAMIC;
/* Set the default for excess precision. */
enum excess_precision flag_excess_precision_cmdline = EXCESS_PRECISION_DEFAULT;
/* Nonzero means change certain warnings into errors.
Usually these are warnings about failure to conform to some standard. */
int flag_pedantic_errors = 0;
/* Nonzero means make permerror produce warnings instead of errors. */
int flag_permissive = 0;
......@@ -2402,7 +2356,8 @@ toplev_main (int argc, char **argv)
/* Parse the options and do minimal processing; basically just
enough to default flags appropriately. */
decode_options (&global_options, &global_options_set,
save_decoded_options, save_decoded_options_count);
save_decoded_options, save_decoded_options_count,
global_dc);
init_local_tick ();
......
......@@ -74,12 +74,7 @@ extern unsigned local_tick;
/* Top-level source file. */
extern const char *main_input_filename;
extern const char *dump_base_name;
extern const char *dump_dir_name;
extern const char *aux_base_name;
extern const char *aux_info_file_name;
extern const char *profile_data_prefix;
extern const char *asm_file_name;
extern bool exit_after_options;
/* True if the user has tagged the function with the 'section'
......
......@@ -3887,11 +3887,6 @@ extern GTY(()) tree integer_types[itk_none];
#define int128_integer_type_node integer_types[itk_int128]
#define int128_unsigned_type_node integer_types[itk_unsigned_int128]
/* Set to the default thread-local storage (tls) model to use. */
extern enum tls_model flag_tls_default;
/* A pointer-to-function member type looks like:
struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment