Functions |
static void | set_Wstrict_aliasing (struct gcc_options *opts, int onoff) |
void | set_struct_debug_option (struct gcc_options *opts, location_t loc, const char *spec) |
void | strip_off_ending () |
int | base_of_path () |
static void | handle_param (struct gcc_options *opts, struct gcc_options *opts_set, location_t loc, const char *carg) |
static void | set_debug_level (enum debug_info_type type, int extended, const char *arg, struct gcc_options *opts, struct gcc_options *opts_set, location_t loc) |
static void | set_fast_math_flags (struct gcc_options *opts, int set) |
static void | decode_d_option (const char *arg, struct gcc_options *opts, location_t loc, diagnostic_context *dc) |
static void | set_unsafe_math_optimizations_flags (struct gcc_options *opts, int set) |
static void | enable_warning_as_error (const char *arg, int value, unsigned int lang_mask, const struct cl_option_handlers *handlers, struct gcc_options *opts, struct gcc_options *opts_set, location_t loc, diagnostic_context *dc) |
bool | target_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, const struct cl_decoded_option *decoded, unsigned int lang_mask, int kind, location_t loc, const struct cl_option_handlers *handlers, diagnostic_context *dc) |
static void | add_comma_separated_to_vector () |
void | init_options_struct () |
static void | maybe_default_option (struct gcc_options *opts, struct gcc_options *opts_set, const struct default_options *default_opt, int level, bool size, bool fast, bool debug, unsigned int lang_mask, const struct cl_option_handlers *handlers, location_t loc, diagnostic_context *dc) |
static void | maybe_default_options (struct gcc_options *opts, struct gcc_options *opts_set, const struct default_options *default_opts, int level, bool size, bool fast, bool debug, unsigned int lang_mask, const struct cl_option_handlers *handlers, location_t loc, diagnostic_context *dc) |
void | default_options_optimization (struct gcc_options *opts, struct gcc_options *opts_set, struct cl_decoded_option *decoded_options, unsigned int decoded_options_count, location_t loc, unsigned int lang_mask, const struct cl_option_handlers *handlers, diagnostic_context *dc) |
void | finish_options (struct gcc_options *opts, struct gcc_options *opts_set, location_t loc) |
static void | wrap_help (const char *help, const char *item, unsigned int item_width, unsigned int columns) |
static void | print_filtered_help (unsigned int include_flags, unsigned int exclude_flags, unsigned int any_flags, unsigned int columns, struct gcc_options *opts, unsigned int lang_mask) |
static void | print_specific_help (unsigned int include_flags, unsigned int exclude_flags, unsigned int any_flags, struct gcc_options *opts, unsigned int lang_mask) |
bool | common_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, const struct cl_decoded_option *decoded, unsigned int lang_mask, int kind, location_t loc, const struct cl_option_handlers *handlers, diagnostic_context *dc) |
static void | set_Wstrict_aliasing () |
static void | set_fast_math_flags () |
static void | set_unsafe_math_optimizations_flags () |
bool | fast_math_flags_set_p () |
bool | fast_math_flags_struct_set_p () |
static void | setup_core_dumping () |
char * | option_name (diagnostic_context *context, int option_index, diagnostic_t orig_diag_kind, diagnostic_t diag_kind) |
Handle target- and language-independent options. Return zero to
generate an "unknown option" message. Only options that need
extra handling need to be listed here; if you simply want
DECODED->value assigned to a variable, it happens automatically.
References add_comma_separated_to_vector(), cl_decoded_option::arg, cl_decoded_option::canonical_option_num_elements, cl_lang_count, colorize_init(), control_warning_option(), DBX_DEBUG, diagnostic_context::dc_inhibit_warnings, diagnostic_context::dc_warn_system_headers, decode_d_option(), diagnostic_set_caret_max_width(), DWARF2_DEBUG, enable_warning_as_error(), error_at(), diagnostic_context::fatal_errors, free(), FULL_BUILTIN_STACK_CHECK, GENERIC_STACK_CHECK, handle_param(), lang_names, len, diagnostic_context::max_errors, NO_DEBUG, NO_STACK_CHECK, cl_decoded_option::opt_index, option_flag_var(), diagnostic_context::pedantic_errors, pflags, pp_set_line_maximum_length(), print_specific_help(), diagnostic_context::printer, SDB_DEBUG, set_debug_level(), set_fast_math_flags(), set_param_value(), set_unsafe_math_optimizations_flags(), set_Wstrict_aliasing(), diagnostic_context::show_caret, diagnostic_context::show_column, diagnostic_context::show_option_requested, STATIC_BUILTIN_STACK_CHECK, strip_off_ending(), strlen(), cl_decoded_option::value, VMS_DEBUG, WARN_STRICT_OVERFLOW_CONDITIONAL, diagnostic_context::warning_as_error_requested, warning_at(), and XCOFF_DEBUG.
Referenced by set_default_handlers(), and set_option_handlers().
static void enable_warning_as_error |
( |
const char * |
arg, |
|
|
int |
value, |
|
|
unsigned int |
lang_mask, |
|
|
const struct cl_option_handlers * |
handlers, |
|
|
struct gcc_options * |
opts, |
|
|
struct gcc_options * |
opts_set, |
|
|
location_t |
loc, |
|
|
diagnostic_context * |
dc |
|
) |
| |
|
static |
static void maybe_default_option |
( |
struct gcc_options * |
opts, |
|
|
struct gcc_options * |
opts_set, |
|
|
const struct default_options * |
default_opt, |
|
|
int |
level, |
|
|
bool |
size, |
|
|
bool |
fast, |
|
|
bool |
debug, |
|
|
unsigned int |
lang_mask, |
|
|
const struct cl_option_handlers * |
handlers, |
|
|
location_t |
loc, |
|
|
diagnostic_context * |
dc |
|
) |
| |
|
static |
If indicated by the optimization level LEVEL (-Os if SIZE is set,
-Ofast if FAST is set, -Og if DEBUG is set), apply the option DEFAULT_OPT
to OPTS and OPTS_SET, diagnostic context DC, location LOC, with language
mask LANG_MASK and option handlers HANDLERS.
References cl_options, cl_option::cl_reject_negative, debug, handle_generated_option(), and option().
Referenced by maybe_default_options().
static void maybe_default_options |
( |
struct gcc_options * |
opts, |
|
|
struct gcc_options * |
opts_set, |
|
|
const struct default_options * |
default_opts, |
|
|
int |
level, |
|
|
bool |
size, |
|
|
bool |
fast, |
|
|
bool |
debug, |
|
|
unsigned int |
lang_mask, |
|
|
const struct cl_option_handlers * |
handlers, |
|
|
location_t |
loc, |
|
|
diagnostic_context * |
dc |
|
) |
| |
|
static |
As indicated by the optimization level LEVEL (-Os if SIZE is set,
-Ofast if FAST is set), apply the options in array DEFAULT_OPTS to
OPTS and OPTS_SET, diagnostic context DC, location LOC, with
language mask LANG_MASK and option handlers HANDLERS.
References maybe_default_option().
Referenced by default_options_optimization().
static void print_filtered_help |
( |
unsigned int |
include_flags, |
|
|
unsigned int |
exclude_flags, |
|
|
unsigned int |
any_flags, |
|
|
unsigned int |
columns, |
|
|
struct gcc_options * |
opts, |
|
|
unsigned int |
lang_mask |
|
) |
| |
|
static |
Print help for a specific front-end, etc.
References cl_enum_arg::arg, cl_enums, cl_enums_count, cl_lang_count, cl_options, cl_options_count, CLVC_DEFER, CLVC_ENUM, CLVC_STRING, compiler_params, enum_value_to_arg(), cl_option::flags, cl_enum::get, param_info::help, cl_option::help, lang_names, LAST_PARAM, len, cl_option::opt_text, param_info::option, option(), option_enabled(), option_flag_var(), snprintf(), strlen(), undocumented_msg, cl_enum::values, cl_option::var_enum, cl_option::var_type, and wrap_help().
Referenced by print_specific_help().
static void set_debug_level |
( |
enum debug_info_type |
type, |
|
|
int |
extended, |
|
|
const char * |
arg, |
|
|
struct gcc_options * |
opts, |
|
|
struct gcc_options * |
opts_set, |
|
|
location_t |
loc |
|
) |
| |
|
static |
static void set_Wstrict_aliasing |
( |
struct gcc_options * |
opts, |
|
|
int |
onoff |
|
) |
| |
|
static |
@verbatim Command line option handling.
Copyright (C) 2002-2013 Free Software Foundation, Inc. Contributed by Neil Booth.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
Referenced by common_handle_option().
static void set_Wstrict_aliasing |
( |
| ) |
|
|
static |
Used to set the level of strict aliasing warnings in OPTS,
when no level is specified (i.e., when -Wstrict-aliasing, and not
-Wstrict-aliasing=level was given).
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, currently 3.