This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12355] New: parse error on invocation of class static member function template
- From: "notbob at tessellation dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Sep 2003 20:21:09 -0000
- Subject: [Bug c++/12355] New: parse error on invocation of class static member function template
- 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=12355
Summary: parse error on invocation of class static member
function template
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: notbob at tessellation dot com
CC: gcc-bugs at gcc dot gnu dot org
Test code:
template <typename A, typename B>
class C
{
public:
typedef typename B::result_type result_type;
void foo(void)
{
int i = A::bar<result_type>(); // error on this line
}
};
Error text is:
gcc_bug.cpp: In member function `void C<A, B>::foo()':
gcc_bug.cpp:9: parse error before `;' token
Compiler version is:
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-3/configure --enable-
languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-
zlib --enable-nls --without-included-gettext --enable-interpreter --disable-
sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --
build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-
haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --
includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.2 20020927 (prerelease)
The code compiles and executes under MSVC 6.0 and MetroWerks 7.
Thank you,
Robert Allan Schwartz