diff options
author | Martin Liska <mliska@suse.cz> | 2020-03-19 11:58:53 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-05-05 16:02:06 +0200 |
commit | 48c041033ec07b22fda380daa208ab754ec52b68 (patch) | |
tree | accb3810832117317dad9679ee5fd6b65a40dcd1 /gcc/opts-global.c | |
parent | d2148424165849ac9fe413b7a8d7cd198959bebf (diff) | |
download | gcc-48c041033ec07b22fda380daa208ab754ec52b68.zip gcc-48c041033ec07b22fda380daa208ab754ec52b68.tar.gz gcc-48c041033ec07b22fda380daa208ab754ec52b68.tar.bz2 |
Provide hint for misspelled -fdump-foo options.
gcc/ChangeLog:
2020-03-19 Martin Liska <mliska@suse.cz>
* dumpfile.c (dump_switch_p): Change return type
and print option suggestion.
* dumpfile.h: Change return type.
* opts-global.c (handle_common_deferred_options):
Move error into dump_switch_p function.
gcc/testsuite/ChangeLog:
2020-03-19 Martin Liska <mliska@suse.cz>
* gcc.dg/spellcheck-options-22.c: New test.
Diffstat (limited to 'gcc/opts-global.c')
-rw-r--r-- | gcc/opts-global.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/opts-global.c b/gcc/opts-global.c index c658805..b1a8429 100644 --- a/gcc/opts-global.c +++ b/gcc/opts-global.c @@ -385,8 +385,7 @@ handle_common_deferred_options (void) break; case OPT_fdump_: - if (!g->get_dumps ()->dump_switch_p (opt->arg)) - error ("unrecognized command-line option %<-fdump-%s%>", opt->arg); + g->get_dumps ()->dump_switch_p (opt->arg); break; case OPT_fopt_info_: |