bug: nested template: redefinition of destructor

Robert Suna suna@fzi.de
Sun Apr 19 23:17:00 GMT 1998


One more bug of my collection. In the following code shouldn't be a conflict.

I have compiled that code with egcs-2.90.27
980315 (egcs-1.0.2 release) on solaris2.5.0 and Linux 2.0.32, it crashes.

GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release).
 /usr/ccs/bin/as -V -Qy -s -o bug1.o /var/tmp/cca000vh.s
/usr/ccs/bin/as: SC4.0 dev 15 Feb 1995
/usr/ccs/bin/as: "/var/tmp/cca000vh.s", line 91: error: redefinition of symbol "_._t6tArray1Zt8tADLList2ZiZ6tIndex"
/usr/ccs/bin/as: "/var/tmp/cca000vh.s", line 116: warning: size of "_._t6tArray1Zt8tADLList2ZiZ6tIndex" redefined

template <class tEL>
class tArray
{
public:
  ~tArray(){}
};

template <class tKEY, class tEL>
class tADLList
{
public:
  ~tADLList(){}
};

class tDispmode
{
  typedef struct {
    int index;
  }tIndex;

  typedef tArray< tADLList<int,tIndex> > tCollisionHash;

  tCollisionHash collision_hash;
};

class tWtype
{
  typedef struct {
    int index;
  }tIndex;

  typedef tArray< tADLList<int,tIndex> > tCollisionHash;

  tCollisionHash collision_hash;
};

tDispmode HashDispmode;
tWtype    HashWtype;



More information about the Gcc-bugs mailing list