internal compiler error & templates

Thomas Kunert kunert@physik.tu-dresden.de
Wed May 13 06:36:00 GMT 1998


Hi,
sorry if this is a known bug.
Consider the following code:

--------------------------
template<class T>
class A{
public:
        A(int);
};

template <class T>
void f(T);

void g()
{
        f(A(1));  // <--internal compiler error
}
                                      
--------------------------

That program is ill-formed (it should be 'f(A<some_type>(1))'), but the
error message seems not appropriate.

--
Thomas Kunert



More information about the Gcc-bugs mailing list