https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882
--- Comment #4 from Jonathan Wakely ---
IMHO that's a reasonable interpretation, but so is GCC's :-)
Transforming the program as per 10.3.1.1 [namespace.unnamed] we get:
namespace N { }
using namespace N;
namespace N { struct S; }
class C {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882
--- Comment #3 from Stephan Bergmann ---
(In reply to Jonathan Wakely from comment #2)
> 10.3.1.2 [namespace.memdef] p3 says "the lookup to determine whether the
> entity has been previously declared shall not consider any scopes outside
> the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882
--- Comment #2 from Jonathan Wakely ---
GCC adds a declaration of struct S to the enclosing namespace, and makes that a
friend, rather than the struct S in the unnamed namespace.
10.3.1.2 [namespace.memdef] p3 says "the lookup to determine
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882
Raphael Kubo da Costa changed:
What|Removed |Added
CC||raphael.kubo.da.costa@intel