https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67074
Bug ID: 67074
Summary: Name lookup ambiguity between namespace and its alias
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: anders.granlund.0 at gmail dot com
Target Milestone: ---
Test case:
namespace P{ namespace X { static int i = 1; } }
namespace Q { namespace X = P::X; }
using namespace P;
using namespace Q;
int main() { X::i; }
Command line:
g++ prog.cc -std=c++14 -pedantic-errors
This results in name-lookup ambiguity errors when looking up X in main. This is
not a name-lookup ambiguity since the two names founds denotes the same entity.
I tried this with gcc HEAD 6.0.0 20150730 here:
http://melpon.org/wandbox/permlink/6IBZhBmgDMkq6Eho