static VEC(char_p,heap) *flag_instrument_functions_exclude_functions;
static VEC(char_p,heap) *flag_instrument_functions_exclude_files;
+typedef const char *const_char_p; /* For DEF_VEC_P. */
+DEF_VEC_P(const_char_p);
+DEF_VEC_ALLOC_P(const_char_p,heap);
+
+static VEC(const_char_p,heap) *ignored_options;
+
/* Input file names. */
const char **in_fnames;
unsigned num_in_fnames;
free (bad_lang);
}
+/* Buffer the unknown option described by the string OPT. Currently,
+ we only complain about unknown -Wno-* options if they may have
+ prevented a diagnostic. Otherwise, we just ignore them. */
+
+static void postpone_unknown_option_error(const char *opt)
+{
+ VEC_safe_push (const_char_p, heap, ignored_options, opt);
+}
+
+/* Produce an error for each option previously buffered. */
+
+void print_ignored_options (void)
+{
+ location_t saved_loc = input_location;
+
+ input_location = 0;
+
+ while (!VEC_empty (const_char_p, ignored_options))
+ {
+ const char *opt;
+ opt = VEC_pop (const_char_p, ignored_options);
+ error ("unrecognized command line option \"%s\"", opt);
+ }
+
+ input_location = saved_loc;
+}
+
/* Handle the switch beginning at ARGV for the language indicated by
LANG_MASK. Returns the number of switches consumed. */
static unsigned int
opt = dup;
value = 0;
opt_index = find_opt (opt + 1, lang_mask | CL_COMMON | CL_TARGET);
+ if (opt_index == cl_options_count && opt[1] == 'W')
+ {
+ /* We don't generate errors for unknown -Wno-* options
+ unless we issue diagnostics. */
+ postpone_unknown_option_error (argv[0]);
+ result = 1;
+ goto done;
+ }
}
if (opt_index == cl_options_count)
flag_tree_fre = 1;
flag_tree_copy_prop = 1;
flag_tree_sink = 1;
- flag_tree_salias = 1;
if (!no_unit_at_a_time_default)
flag_unit_at_a_time = 1;
flag_reorder_functions = 1;
flag_tree_store_ccp = 1;
flag_tree_vrp = 1;
+ flag_tree_builtin_dce = 1;
if (!optimize_size)
{
break;
case OPT_Wlarger_than_:
+ /* This form corresponds to -Wlarger-than-.
+ Kept for backward compatibility.
+ Don't use it as the first argument of warning(). */
+
+ case OPT_Wlarger_than_eq:
larger_than_size = value;
warn_larger_than = value != -1;
break;
flag_inline_functions_set = true;
break;
+ case OPT_fprofile_dir_:
+ profile_data_prefix = xstrdup (arg);
+ break;
+
+ case OPT_fprofile_use_:
+ profile_data_prefix = xstrdup (arg);
+ flag_profile_use = true;
+ value = true;
+ /* No break here - do -fprofile-use processing. */
case OPT_fprofile_use:
if (!flag_branch_probabilities_set)
flag_branch_probabilities = value;
flag_inline_functions = value;
break;
+ case OPT_fprofile_generate_:
+ profile_data_prefix = xstrdup (arg);
+ value = true;
+ /* No break here - do -fprofile-generate processing. */
case OPT_fprofile_generate:
if (!profile_arc_flag_set)
profile_arc_flag = value;
case OPT_fstrength_reduce:
case OPT_ftree_store_copy_prop:
case OPT_fforce_addr:
+ case OPT_ftree_salias:
/* These are no-ops, preserved for backward compatibility. */
break;
gcc_assert (onoff == 0 || onoff == 1);
if (onoff != 0)
warn_strict_aliasing = 3;
+ else
+ warn_strict_aliasing = 0;
}
/* The following routines are useful in setting all the flags that