This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16650] New: class-disambigued name lookup


$ cat >test.cxx
namespace n
{
  struct s
  {
  };
  
  void
  s ();
  
  void
  f ()
  {
    class s s_; // (*)
  }
}

void 
f ()
{
  class n::s s_;
}

$ g++ --version
g++ (GCC) 3.3.4 (Debian 1:3.3.4-4)

$ g++ -c test.cxx
test.cxx: In function `void f()':
test.cxx:20: error: `n' does not have a class or union named `s'
test.cxx:20: error: aggregate `s s_' has incomplete type and cannot be defined

Note that there is no error at (*). This code compiles fine with gcc 3.4.

-- 
           Summary: class-disambigued name lookup
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: boris at kolpackov dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-gnu-linuc
  GCC host triplet: i686-pc-gnu-linuc
GCC target triplet: i686-pc-gnu-linuc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16650


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]