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]

Virtual destructor bug


The following program (a slight modification of a program to
demonstrate another bug), triggers an entirely different bug in the
latest version of egcs.  Adding the firtual destructor causes egcs to
fail with this message:

% c++ -c -O egcs-bug.C
egcs-bug.C:21: sorry, not implemented: `namespace_decl' not supported by dump_type
egcs-bug.C: In instantiation of `ihash<element,1>':
egcs-bug.C:21:   instantiated from here
egcs-bug.C:21: conflicting types for `vtable for '
egcs-bug.C:21: previous declaration as `vtable for struct ihash_core<element,1>'

The program compiles with gcc2 and egcs 1.0.3.

Thanks,
David

--

template<class T>
class ihash_entry {
};

template<class T, ihash_entry<T> T::*field>
struct ihash_core {
  ihash_core () {}
  virtual ~ihash_core () {}
};

template<class T, ihash_entry<T> T::*field>
struct ihash : public ihash_core<T, field>
{
  ihash () {}
};

struct element {
  ihash_entry<element> hlink;
};

ihash<element, &element::hlink> etab;


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