http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50399
Bug #: 50399 Summary: [c++11] Lookup error w/ enums Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: blelb...@cct.lsu.edu $ cat cxx11_enum_lookup_bug.cpp namespace A { namespace B { void F() { } } namespace C { enum B { }; void G() { B::F(); } } } $ /usr/lib/gcc-snapshot/bin/g++ --version g++ (Debian 20110816-1) 4.7.0 20110816 (experimental) [trunk revision 177785] Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ /usr/lib/gcc-snapshot/bin/g++ cxx11_enum_lookup_bug.cpp -c $ /usr/lib/gcc-snapshot/bin/g++ cxx11_enum_lookup_bug.cpp -c -std=c++0x cxx11_enum_lookup_bug.cpp: In function 'void A::C::G()': cxx11_enum_lookup_bug.cpp:13:12: error: 'F' is not a member of 'A::C::B' $ g++-4.6 --version g++-4.6 (Debian 4.6.1-8) 4.6.1 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++-4.6 cxx11_enum_lookup_bug.cpp -c $ g++-4.6 cxx11_enum_lookup_bug.cpp -c -std=c++0x cxx11_enum_lookup_bug.cpp: In function ‘void A::C::G()’: cxx11_enum_lookup_bug.cpp:13:12: error: ‘F’ is not a member of ‘A::C::B’ $ g++-4.5 --version g++-4.5 (Debian 4.5.3-8) 4.5.3 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++-4.5 cxx11_enum_lookup_bug.cpp -c $ g++-4.5 cxx11_enum_lookup_bug.cpp -c -std=c++0x cxx11_enum_lookup_bug.cpp: In function ‘void A::C::G()’: cxx11_enum_lookup_bug.cpp:13:12: error: ‘F’ is not a member of ‘A::C::B’ $ g++-4.4 --version g++-4.4 (Debian 4.4.6-8) 4.4.6 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++-4.4 cxx11_enum_lookup_bug.cpp -c $ g++-4.4 cxx11_enum_lookup_bug.cpp -c -std=c++0x cxx11_enum_lookup_bug.cpp: In function ‘void A::C::G()’: cxx11_enum_lookup_bug.cpp:13: error: ‘F’ is not a member of ‘A::C::B’