summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2019-07-24 20:34:03 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2019-07-24 14:34:03 -0600
commitfa5baeedd47e84b36aff8191bfdf86ee03829a4c (patch)
tree555ecd4cee3204df4576e6ad2ed71999246dd69c /gcc/toplev.c
parente34616747028ebeb0be867dc6a23682539bfab60 (diff)
PR driver/80545 - option -Wstringop-overflow not recognized by Fortran
gcc/cp/ChangeLog: PR driver/80545 * decl.c (finish_function): Use lang_mask. gcc/testsuite/ChangeLog: PR driver/80545 * gcc.misc-tests/help.exp: Add tests. * lib/options.exp: Handle C++. gcc/ChangeLog: PR driver/80545 * diagnostic.c (diagnostic_classify_diagnostic): Use lang_mask. (diagnostic_report_diagnostic): Same. * diagnostic.h (diagnostic_context::option_enabled): Add an argument. (diagnostic_context::lang_mask): New data member. * ipa-pure-const.c (suggest_attribute): Use lang_hooks.option_lang_mask (). * opts-common.c (option_enabled): Handle new argument. (get_option_state): Pass an additional argument. * opts.c (print_filtered_help): Print supported languages for unsupported options. Adjust printing of current state. * opts.h (option_enabled): Add argument. * toplev.c (print_switch_values): Use lang_mask. (general_init): Set global_dc->lang_mask. From-SVN: r273771
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 56ef63e5adb..7e0b9216dea 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -815,9 +815,10 @@ print_switch_values (print_switch_fn_type print_fn)
pos = print_single_switch (print_fn, 0,
SWITCH_TYPE_DESCRIPTIVE, _("options enabled: "));
+ unsigned lang_mask = lang_hooks.option_lang_mask ();
for (j = 0; j < cl_options_count; j++)
if (cl_options[j].cl_report
- && option_enabled (j, &global_options) > 0)
+ && option_enabled (j, lang_mask, &global_options) > 0)
pos = print_single_switch (print_fn, pos,
SWITCH_TYPE_ENABLED, cl_options[j].opt_text);
@@ -1088,6 +1089,7 @@ general_init (const char *argv0, bool init_signals)
/* Initialize the diagnostics reporting machinery, so option parsing
can give warnings and errors. */
diagnostic_initialize (global_dc, N_OPTS);
+ global_dc->lang_mask = lang_hooks.option_lang_mask ();
/* Set a default printer. Language specific initializations will
override it later. */
tree_diagnostics_defaults (global_dc);