This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug of template function
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: bug of template function
- From: =?X-UNKNOWN?B?sWm03Lap?= <cooly at mis dot im dot tku dot edu dot tw>
- Date: Sun, 12 Mar 2000 05:22:07 +0800 (CST)
egcs tell me :
t2.cc: In function `int main(...)':
t2.cc:22: Internal compiler error 980715.
t2.cc:22: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
t2.cc:22: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
#include <iostream.h>
typedef void(*FunP)(void);
template <class T>
void fun(void)
{
T x;
cout << "work" << endl;
}
void test(FunP f)
{
f();
}
void main(void)
{
fun<int>();
fun<float>();
test(fun<int>);
test(fun<float>);
}