This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52647] Method from global namespace not selected in anonymous namespace when an overload of said method already exists in the anonymous namespace
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Mar 2012 01:59:17 +0000
- Subject: [Bug c++/52647] Method from global namespace not selected in anonymous namespace when an overload of said method already exists in the anonymous namespace
- Auto-submitted: auto-generated
- References: <bug-52647-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52647
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-21 01:59:17 UTC ---
This is correct. The behavior can be seen with:
void foo(char) {}
namespace anon { void foo(void*) {} }
using namespace anon;
namespace anon { void bar() { foo('x'); } }
foo in the anon namespace is only foo as ::foo is hidden and char does not have
a namespace associated with it for ADL.