Bug with templates
Jim Foley
jfoley@quickturn.com
Wed Apr 1 21:12:00 GMT 1998
When I compile the source file below with g++ -c <filename.cc>
I get an internal error:
bug.cc:40: Internal compiler error.
bug.cc:40: Please submit a full bug report to `egcs-bugs@cygnus.com'.
This version of g++ is egcs-2.90.23 980102 (egcs-1.0.1 release), running on
Linux version 2.0.30.
template <class td> class VEexpr;
template <class td> class VEbinaryExpr;
#define TYPEDEFS typedef typename td::Expr Expr;
class VEtypedef
{
public:
typedef VEexpr<VEtypedef> Expr;
typedef VEbinaryExpr<VEtypedef> BinaryExpr;
};
template <class td>
class VEexpr : virtual public td
{
public:
virtual void print() = 0;
};
template <class td>
class VEbinaryExpr : public td::Expr
{
TYPEDEFS;
Expr* _right;
Expr* _left;
public:
VEbinaryExpr(VEexpr<td>* right, VEexpr<td>* left)
{ _right = right; _left = left; }
void print();
};
template VEbinaryExpr<VEtypedef>;
More information about the Gcc-bugs
mailing list