Name resolution bug with templated classes and functions

Hans Utz hans.utz@student.uni-ulm.de
Sun Nov 15 16:05:00 GMT 1998


This little program produces an internal compiler error.

template<class T>
struct c1
{

};

template<class T>
struct c2 {
  void c1() {}
};

template<class T>
void foo(T) 
{
  c2<T> bar;

  bar.c1();
};

int main (char*, char**)
{
  foo(1); 
  return 0;
}

I´m using egcs-2.91.57 coming with the 1.1b release 
on a Linx 2.0.32 PC.

I found this problem within the LEDA-3.7.1 class library.

Hans



More information about the Gcc-bugs mailing list