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++/11118] New: Regression in 3.4 (cvs from jun 06) using nested classes in templates


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Regression in 3.4 (cvs from jun 06) using nested classes
                    in templates
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: lars@trolltech.com
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

The following code compiles fine in all versions < 3.4: 
 
template<typename T> class Foo 
{ 
public: 
    void foo(); 
    class Data { 
    }; 
}; 
 
template<typename T> void Foo<T>::foo() 
{ 
    // compiles 
    Data *y; 
    // doesn't compile 
    Foo::Data *x; 
} 
 
[lars@binky gcc-bugs]$ gcc nested.cpp 
nested.cpp: In member function `void Foo<T>::foo()': 
nested.cpp:14: error: `x' has not been declared 
[lars@binky gcc-bugs]$ gcc -v 
Reading specs from /home/lars/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs 
Configured with: ../gcc/configure --prefix=/home/lars/gcc --disable-libgcj 
Thread model: posix 
gcc version 3.4 20030605 (experimental) 
 
 
Best regards, 
Lars


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