This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20746] Incorrect return value for covariant return function returning null ptr
- From: "scp at predict dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jul 2005 21:47:33 -0000
- Subject: [Bug c++/20746] Incorrect return value for covariant return function returning null ptr
- References: <20050404142435.20746.yanliu@ca.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From scp at predict dot com 2005-07-06 21:47 -------
(In reply to comment #9)
> the bug is not a regression, so it has not gone into 4.0. As there seems to be
> a need for it, and the patch is small, we could probably do it. Right now 4.0
> is frozen for 4.0.1 though
Nathan,
4.0.2 is certainly fine by me. I've already applied the patch locally to 4.0.0,
and will continue to do so until it is folded in to 4.0.X.
I just wanted to clarify that there is a need for it for any code which has a
function returning a pointer to derived class instance which is then assigned to
a pointer to a virtual base class of that class type. I have plenty of
non-trivial code which does this which is why I discovered the problem and your
3.4.X fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20746