c++/6322: Multiple inheritance structure causes segfault on delete.
nathan@gcc.gnu.org
nathan@gcc.gnu.org
Thu Apr 25 07:26:00 GMT 2002
Synopsis: Multiple inheritance structure causes segfault on delete.
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Thu Apr 25 07:19:33 2002
State-Changed-Why:
not a bug. your code is ill-formed.
you are attempting to delete a derived object using a
pointer to one of its bases. Refer to [5.3.5].
In particular, if the static type of the object (base in
your case) is different to the dynamic type (derived),
the static type shall be a base of the dynamic type (ok),
and the static type shall have a virtual destructor, otherwise
the behaviour is undefined.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6322
More information about the Gcc-bugs
mailing list