diff options
Diffstat (limited to 'gcc/c-family/c-opts.cc')
-rw-r--r-- | gcc/c-family/c-opts.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc index 0ec30e8..54e397c 100644 --- a/gcc/c-family/c-opts.cc +++ b/gcc/c-family/c-opts.cc @@ -913,6 +913,16 @@ c_common_post_options (const char **pfilename) else flag_permitted_flt_eval_methods = PERMITTED_FLT_EVAL_METHODS_C11; + if (cxx_dialect >= cxx26) + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_auto_var_init, AUTO_INIT_CXX26); + + /* The -Wtrivial-auto-var-init warning is useless for C++, where we always + add .DEFERRED_INIT calls when some (vacuous) initializers are bypassed + through jumps from switch condition to case/default label. */ + if (c_dialect_cxx ()) + warn_trivial_auto_var_init = 0; + /* C23 Annex F does not permit certain built-in functions to raise "inexact". */ if (flag_isoc23) |