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.

Reply via email to