diff options
author | Martin Liska <mliska@suse.cz> | 2019-11-12 11:10:58 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-11-12 10:10:58 +0000 |
commit | 6ed760441a35e308dc434fac1f6a6589668ee928 (patch) | |
tree | 96693761f01063111373f8f358b08f9123028953 /gcc/c-family/c-opts.c | |
parent | 8100e93b72dfe82c5f084a3d9351b8ad2ef6ab39 (diff) | |
download | gcc-6ed760441a35e308dc434fac1f6a6589668ee928.tar.gz |
Use more SET_OPTION_IF_UNSET.
2019-11-12 Martin Liska <mliska@suse.cz>
* config/i386/i386-options.c (ix86_recompute_optlev_based_flags):
Use SET_OPTION_IF_UNSET.
(ix86_option_override_internal): Likewise.
* opts.c (default_options_optimization): Likewise.
(finish_options): Likewise.
(enable_fdo_optimizations): Likewise.
(common_handle_option): Likewise.
2019-11-12 Martin Liska <mliska@suse.cz>
* c-opts.c (c_common_post_options):
Use SET_OPTION_IF_UNSET.
2019-11-12 Martin Liska <mliska@suse.cz>
* options.c (gfc_init_options):
Use SET_OPTION_IF_UNSET.
2019-11-12 Martin Liska <mliska@suse.cz>
* go-lang.c (go_langhook_post_options):
Use SET_OPTION_IF_UNSET.
From-SVN: r278091
Diffstat (limited to 'gcc/c-family/c-opts.c')
-rw-r--r-- | gcc/c-family/c-opts.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 75b69597be2..c913291c07c 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -828,9 +828,9 @@ c_common_post_options (const char **pfilename) /* C2X Annex F does not permit certain built-in functions to raise "inexact". */ - if (flag_isoc2x - && !global_options_set.x_flag_fp_int_builtin_inexact) - flag_fp_int_builtin_inexact = 0; + if (flag_isoc2x) + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_fp_int_builtin_inexact, 0); /* By default we use C99 inline semantics in GNU99 or C99 mode. C99 inline semantics are not supported in GNU89 or C89 mode. */ @@ -847,9 +847,9 @@ c_common_post_options (const char **pfilename) /* If -ffreestanding, -fno-hosted or -fno-builtin then disable pattern recognition. */ - if (!global_options_set.x_flag_tree_loop_distribute_patterns - && flag_no_builtin) - flag_tree_loop_distribute_patterns = 0; + if (flag_no_builtin) + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_tree_loop_distribute_patterns, 0); /* -Woverlength-strings is off by default, but is enabled by -Wpedantic. It is never enabled in C++, as the minimum limit is not normative @@ -918,16 +918,17 @@ c_common_post_options (const char **pfilename) && (cxx_dialect >= cxx11 || flag_isoc99)); /* -Wregister is enabled by default in C++17. */ - if (!global_options_set.x_warn_register) - warn_register = cxx_dialect >= cxx17; + SET_OPTION_IF_UNSET (&global_options, &global_options_set, warn_register, + cxx_dialect >= cxx17); /* -Wcomma-subscript is enabled by default in C++20. */ - if (!global_options_set.x_warn_comma_subscript) - warn_comma_subscript = (cxx_dialect >= cxx2a && warn_deprecated); + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + warn_comma_subscript, + cxx_dialect >= cxx2a && warn_deprecated); /* -Wvolatile is enabled by default in C++20. */ - if (!global_options_set.x_warn_volatile) - warn_volatile = (cxx_dialect >= cxx2a && warn_deprecated); + SET_OPTION_IF_UNSET (&global_options, &global_options_set, warn_volatile, + cxx_dialect >= cxx2a && warn_deprecated); /* Declone C++ 'structors if -Os. */ if (flag_declone_ctor_dtor == -1) @@ -979,12 +980,13 @@ c_common_post_options (const char **pfilename) /* By default, enable the new inheriting constructor semantics along with ABI 11. New and old should coexist fine, but it is a change in what artificial symbols are generated. */ - if (!global_options_set.x_flag_new_inheriting_ctors) - flag_new_inheriting_ctors = abi_version_at_least (11); + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_new_inheriting_ctors, + abi_version_at_least (11)); /* For GCC 7, only enable DR150 resolution by default if -std=c++17. */ - if (!global_options_set.x_flag_new_ttp) - flag_new_ttp = (cxx_dialect >= cxx17); + SET_OPTION_IF_UNSET (&global_options, &global_options_set, flag_new_ttp, + cxx_dialect >= cxx17); if (cxx_dialect >= cxx11) { |