This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug of template function


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>);
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]