c++: Identifier type value should not update binding

Nathan Sidwell nathan@acm.org
Tue Sep 29 14:46:50 GMT 2020


This simplification removes some unneeded behaviour in
set_identifier_type_value_with_scope, which was updating the namespace
binding.  And causing update_binding to have to deal with meeting two
implicit typedefs.  But the typedef is already there, and there's no
other way to have two such typedef's collide (we'll already have dealt
with that in lookup_elaborated_type).

So, let's kill this crufty code.

         gcc/cp/
         * name-lookup.c (update_binding): We never meet two implicit
         typedefs.
         (do_pushdecl): Adjust set_identifier_type_value_with_scope calls.
         (set_identifier_type_value_with_scope): Do not update binding in
         the namespace-case.  Assert it is already there.

pushing to trunk

nathan

-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: id-type-val.diff
Type: text/x-patch
Size: 3757 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200929/e791267e/attachment.bin>


More information about the Gcc-patches mailing list