From Stack Avarflaw (https://stackoverflow.com/q/67096550/2069064): namespace A { enum A {}; }; using namespace A; using enum A; gcc trunk rejects this lookup as ambiguous, between the namespace A and the enum A. But our lookup in this context should be type-only, so the namespace A should not a candidate.
Also gcc accepts: namespace A { enum A {}; }; using namespace A; using enum A::A; Which, apparently, this one should actually be ambiguous.
Confirmed.
Here is a weird case that I think should be accepted: enum e { e }; using enum e; gcc rejects with: <source>:2:12: error: 'e' is not a type 2 | using enum e; | ^
*** Bug 103824 has been marked as a duplicate of this bug. ***