This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25747] New: Error accessing typedef of a template class from template
- From: "a dot llano at ziv dot es" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jan 2006 10:03:48 -0000
- Subject: [Bug c++/25747] New: Error accessing typedef of a template class from template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I have a minimal test case that fails, and I think it is a well formed source.
I tried with another C++ compilers and it works. (I hope I've not made any
mistake because this is my first bug filled to gcc).
The source code:
$ cat > test.C
template <class T>
class A
{
public:
typedef int B;
};
template <class T>
void test()
{
A<T>::B b;
}
The error produced is:
$ g++ -o test.o test.C
test.cpp: In function 'void test()':
test.cpp:11: error: expected `;' before 'b'
The info of my compiler:
$ g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
--
Summary: Error accessing typedef of a template class from
template
Product: gcc
Version: 4.0.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: a dot llano at ziv dot es
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25747