This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80177] wrong fixit hint for misspelled static_assert: __cpp_static_assert
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Mar 2017 18:48:33 +0000
- Subject: [Bug c++/80177] wrong fixit hint for misspelled static_assert: __cpp_static_assert
- Auto-submitted: auto-generated
- References: <bug-80177-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80177
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2017-03-29
CC| |dmalcolm at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |dmalcolm at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Confirmed.
lookup_name_fuzzy (..., FUZZY_LOOKUP_NAME) is called, but it runs
into two problems:
(a) It considers close matches in the preprocessor and will return *before*
considering reserved words. Need to update it to consider the best match from
both.
(b) With (a) fixed, it would consider "static_assert":
(gdb) p c_common_reswords[155]
$11 = {word = 0x1a0f8c2 "static_assert", rid = RID_STATIC_ASSERT, disable =
522}
but it rejects it here:
4998 if (!cp_keyword_starts_decl_specifier_p (resword->rid))
4999 continue;
Am working on a fix.