https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110349
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- Yeah, we don't want to give errors in lookup_name, pretty much for the reasons you found. cp_parser_lookup_name gives an ambiguity error when lookup_name returns a TREE_LIST, so I think it makes sense to represent the case of multiple _ declarations as a TREE_LIST rather than OVERLOAD. Then I think you don't need PLACEHOLDER_AMBIGUOUS_BINDING_P because you can see that from the binding being a TREE_LIST. I think find_last_decl should return nothing for a name-independent decl, and give up on a TREE_LIST.