void stat(struct stat*) { } namespace ns { using ::stat; struct stat { }; } This should be ill-formed, because the function declaration also adds "struct stat" to the global namespace, so the using-declaration adds that to ns, and defining struct ns::stat should conflict. Clang says: using.cc:6:3: error: declaration conflicts with target of using declaration already in scope struct stat { }; ^ using.cc:1:18: note: target of using declaration void stat(struct stat*) { } ^ using.cc:5:11: note: using declaration using ::stat; ^ 1 error generated. and EDG says: "using.cc", line 6: error: class "stat" cannot be defined in the current scope struct stat { }; ^ 1 error detected in the compilation of "using.cc".
*** Bug 86600 has been marked as a duplicate of this bug. ***
Testcase from Bug 86600 namespace X { class A; } namespace Y { using X::A; class A {}; }
*** Bug 86665 has been marked as a duplicate of this bug. ***