aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-05-19 00:52:08 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-05-19 00:52:08 +0000
commit70f25790a1effc8f1cba3cb8a368b129c66a87b0 (patch)
tree9a1079536c4e30ba3cb0ff1e7cf8ebb14bdadd92 /gcc/function.c
parent69e95fa03cda406fe61e94371244f0ba9b59339e (diff)
downloadgcc-70f25790a1effc8f1cba3cb8a368b129c66a87b0.zip
gcc-70f25790a1effc8f1cba3cb8a368b129c66a87b0.tar.gz
gcc-70f25790a1effc8f1cba3cb8a368b129c66a87b0.tar.bz2
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/function.c')
0 files changed, 0 insertions, 0 deletions