diff options
author | David Malcolm <dmalcolm@redhat.com> | 2016-05-19 00:52:08 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2016-05-19 00:52:08 +0000 |
commit | 70f25790a1effc8f1cba3cb8a368b129c66a87b0 (patch) | |
tree | 9a1079536c4e30ba3cb0ff1e7cf8ebb14bdadd92 /gcc/Makefile.in | |
parent | 69e95fa03cda406fe61e94371244f0ba9b59339e (diff) | |
download | gcc-70f25790a1effc8f1cba3cb8a368b129c66a87b0.tar.gz |
PR driver/69265: add hint for options with misspelled arguments
opts-common.c's cmdline_handle_error handles invalid arguments
for options with CL_ERR_ENUM_ARG by building a string listing the
valid arguments. By also building a vec of valid arguments, we
can use find_closest_string and provide a hint if we see a close
misspelling.
gcc/ChangeLog:
PR driver/69265
* Makefile.in (GCC_OBJS): Move spellcheck.o to...
(OBJS-libcommon-target): ...here.
* opts-common.c: Include spellcheck.h.
(cmdline_handle_error): Build a vec of valid options and use it
to suggest provide hints for misspelled arguments.
gcc/testsuite/ChangeLog:
PR driver/69265
* gcc.dg/spellcheck-options-11.c: New test case.
From-SVN: r236439
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r-- | gcc/Makefile.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 673f87dad89..587417b4c21 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1160,7 +1160,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@ FORTRAN_TARGET_OBJS=@fortran_target_objs@ # Object files for gcc many-languages driver. -GCC_OBJS = gcc.o gcc-main.o ggc-none.o spellcheck.o +GCC_OBJS = gcc.o gcc-main.o ggc-none.o c-family-warn = $(STRICT_WARN) @@ -1549,7 +1549,7 @@ OBJS-libcommon = diagnostic.o diagnostic-color.o diagnostic-show-locus.o \ # compiler and containing target-dependent code. OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \ opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \ - hash-table.o file-find.o + hash-table.o file-find.o spellcheck.o # This lists all host objects for the front ends. ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS)) |