This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/3661: Parse error in template function using nested class of template argument
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/3661: Parse error in template function using nested class of template argument
- From: roy dot norman at aeat dot co dot uk
- Date: 12 Jul 2001 14:24:23 -0000
- Cc: peter dot sumner at aeat dot co dot uk, andrew dot cliffe at aeat dot co dot uk, wayne at sourceware dot cygnus dot com, sibley at aeat dot co dot uk
- Reply-To: roy dot norman at aeat dot co dot uk
>Number: 3661
>Category: c++
>Synopsis: Parse error in template function using nested class of template argument
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Thu Jul 12 07:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Roy Norman
>Release: 3.0 and 2.96
>Organization:
>Environment:
System: SunOS heatwave 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4
<machine, os, target, libraries (multiple lines)>
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ../gcc-3.0/configure --prefix=/bambi/ajl/extras --enable-threads : (reconfigured) ../gcc-3.0/configure --prefix=/ba
mbi/ajl/extras --enable-threads --enable-libgcj : (reconfigured) ../gcc-3.0/configure --prefix=/bambi/ajl/extras --enable-threads --
enable-libgcj
Also:
Linux jericho 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown
>Description:
Compile test.cpp below:
template<class T>
void foo()
{
T::A anInner;
}
gcc -c -Wall test.cpp
emits:
test.cpp: In function `void foo ()':
test.cpp:4: parse error before `;'
Is this code legal or is it a bug?
KAI 3.4f and MSVC 6.0 accept this code.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: