c++: Identifier type value should not update binding
authorNathan Sidwell <nathan@acm.org>
Tue, 29 Sep 2020 14:38:48 +0000 (07:38 -0700)
committerNathan Sidwell <nathan@acm.org>
Tue, 29 Sep 2020 14:46:24 +0000 (07:46 -0700)
commitcc61827b55e7735a831e52f7ef093c409ddd607a
tree160ddf646c00b4bc3d618a817354240b925c18e4
parent39a27bb01aa223ce89946f0a4de6b60c4c0b03d2
c++: Identifier type value should not update binding

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.
gcc/cp/name-lookup.c