g++ 2.95.2 internal error taking address of a member template function
Martin Sebor
marts@att.net
Sun Apr 23 20:02:00 GMT 2000
Hi,
the code below crashes g++ 2.95.2. This seems to occur whenever the
address of a member template function is taken (implicitly or
explicitly). According to Volker Simonis (Chameleon Objects, C+ Report,
Jan 2000, Vol 12/No 1) this capability existed in egcs 1.1. It does
crash egcs 2.91.66, though.
Regards
Martin
$ cat test.cpp
struct S
{
S () {
void (S::*pf)() = &S::foo<int>;
}
template <class T>
void foo () { }
};
$ g++ test.cpp
test.cpp: In method `S::S()':
test.cpp:6: Internal compiler error.
test.cpp:6: Please submit a full bug report.
test.cpp:6: See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport >
for instructions.
More information about the Gcc-bugs
mailing list