public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50399] New: [c++11] Lookup error w/ enums
@ 2011-09-15  7:06 blelbach at cct dot lsu.edu
  2011-09-15  9:26 ` [Bug c++/50399] " redi at gcc dot gnu.org
  2011-09-15  9:35 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: blelbach at cct dot lsu.edu @ 2011-09-15  7:06 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: blelbach@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’


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-15  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-15  7:06 [Bug c++/50399] New: [c++11] Lookup error w/ enums blelbach at cct dot lsu.edu
2011-09-15  9:26 ` [Bug c++/50399] " redi at gcc dot gnu.org
2011-09-15  9:35 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).