This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21279] New: static Derived-to-Base cast fails when ~Derived has run.
- From: "murrayc at murrayc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Apr 2005 08:18:35 -0000
- Subject: [Bug c++/21279] New: static Derived-to-Base cast fails when ~Derived has run.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In this test case, I cast a Derived* to a Base* after the destructor for the
Derived part has run. It's a strange thing to do, but I think the cast should
succeed, because it does not need instance information.
It only seems to happen when using virtual inheritance. We noticed this in
libsigc++.
--
Summary: static Derived-to-Base cast fails when ~Derived has run.
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: murrayc at murrayc dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21279