[Bug c++/71882] elaborated-type-specifier friend not looked up in unnamed namespace

2018-03-16 Thread redi at gcc dot gnu.org
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 {

[Bug c++/71882] elaborated-type-specifier friend not looked up in unnamed namespace

2018-03-16 Thread sbergman at redhat dot com
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

[Bug c++/71882] elaborated-type-specifier friend not looked up in unnamed namespace

2018-03-16 Thread redi at gcc dot gnu.org
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

[Bug c++/71882] elaborated-type-specifier friend not looked up in unnamed namespace

2018-03-16 Thread raphael.kubo.da.costa at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882 Raphael Kubo da Costa changed: What|Removed |Added CC||raphael.kubo.da.costa@intel