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

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Tue Nov 21 21:59:53 2017
New Revision: 255038

URL: https://gcc.gnu.org/viewcvs?rev=255038&root=gcc&view=rev
Log:
C: don't suggest names that came from earlier failures (PR c/83056)

PR c/83056 reports an issue affecting trunk and gcc-7 in which
the C frontend's implementation of lookup_name_fuzzy uses undeclared
identifiers as suggestions when encountering subsequent undeclared
identifiers.

The fix is to filter out the names bound to error_mark_node
in lookup_name_fuzzy.

The C++ frontend is unaffected, as it already does this.

gcc/c/ChangeLog:
        PR c/83056
        * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
        earlier failed lookups.

gcc/testsuite/ChangeLog:
        PR c/83056
        * gcc.dg/spellcheck-pr83056.c: New test case.


Added:
    trunk/gcc/testsuite/gcc.dg/spellcheck-pr83056.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-decl.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to