This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11118] New: Regression in 3.4 (cvs from jun 06) using nested classes in templates
- From: "lars at trolltech dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2003 21:35:39 -0000
- Subject: [Bug c++/11118] New: Regression in 3.4 (cvs from jun 06) using nested classes in templates
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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