[Bug c++/80177] wrong fixit hint for misspelled static_assert: __cpp_static_assert

dmalcolm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 25 13:35:00 GMT 2017


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

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Tue Apr 25 13:34:50 2017
New Revision: 247233

URL: https://gcc.gnu.org/viewcvs?rev=247233&root=gcc&view=rev
Log:
Fix spelling suggestions for reserved words (PR c++/80177)

gcc/cp/ChangeLog:
        PR c++/80177
        * name-lookup.c (suggest_alternative_in_explicit_scope): Convert
        candidate type of bm from tree to const char *.
        (consider_binding_level): Likewise.
        (lookup_name_fuzzy): Likewise, using this to merge the best
        result from the preprocessor into bm, rather than immediately
        returning, so that better matches from reserved words can "win".
        Guard the rejection of keywords that don't start decl-specifiers
        so it only happens for FUZZY_LOOKUP_TYPENAME.

gcc/testsuite/ChangeLog:
        PR c++/80177
        * g++.dg/spellcheck-pr80177.C: New test case.


Added:
    trunk/gcc/testsuite/g++.dg/spellcheck-pr80177.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list