error with virtual member function as parameter in template argument for a class
Marc Guiot du Doignon
guiot@nmu.alcatel.fr
Fri Feb 11 06:43:00 GMT 2000
Hi,c
gcc give an internal error with the following code.
(it's ok without virtual)
cd /tmp
cat << EOF > testGcc.cc
template <class T, void (T::*FOO)()>
class info
{
};
class toto
{
public :
virtual void foo();
info<toto, &toto::foo> inf;
};
EOF
gcc -c -v testGcc.cc
...
/udir/guiot/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/cc1plus
/var/tmp/ccQQ6upm.ii -quiet -dumpbase testGcc.cc -version -o
/var/tmp/cce6FWtz.s
GNU C++ version 2.95.2 19991024 (release) (hppa1.1-hp-hpux10.20)
compiled by GNU C version 2.95.2 19991024 (release).
testGcc.cc:11: Internal compiler error.
testGcc.cc:11: Please submit a full bug report.
...
Many thanks for your great work
Marc Guiot
More information about the Gcc-bugs
mailing list