This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/67613] spell suggestions for misspelled command line options


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67613

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Fri Nov 13 01:59:03 2015
New Revision: 230285

URL: https://gcc.gnu.org/viewcvs?rev=230285&root=gcc&view=rev
Log:
PR driver/67613 - spell suggestions for misspelled command line options

gcc/ChangeLog:
        PR driver/67613
        * Makefile.in (GCC_OBJS): Add spellcheck.o.
        (OBJS): Add spellcheck-tree.o.
        * gcc.c: Include "spellcheck.h".
        (suggest_option): New function.
        (driver::handle_unrecognized_options): Call suggest_option to
        provide a hint about misspelled options.
        * spellcheck.c: Update file comment.
        (levenshtein_distance): Convert 4-param implementation from static
        to extern scope.  Remove note about unit tests from leading
        comment for const char * implementation.  Move tree
        implementation to...
        * spellcheck-tree.c: New file.
        * spellcheck.h (levenshtein_distance):  Add 4-param decl.

gcc/testsuite/ChangeLog:
        PR driver/67613
        * gcc/testsuite/gcc.dg/spellcheck-options-1.c: New file.
        * gcc/testsuite/gcc.dg/spellcheck-options-2.c: New file.


Added:
    trunk/gcc/spellcheck-tree.c
    trunk/gcc/testsuite/gcc.dg/spellcheck-options-1.c
    trunk/gcc/testsuite/gcc.dg/spellcheck-options-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/gcc.c
    trunk/gcc/spellcheck.c
    trunk/gcc/spellcheck.h
    trunk/gcc/testsuite/ChangeLog

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]