This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Covariant returns?
- To: cheath at umich dot edu (Chris Heath)
- Subject: Re: Covariant returns?
- From: Joe Buck <jbuck at racerx dot synopsys dot com>
- Date: Mon, 6 Mar 2000 19:03:54 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org
> I'm wondering if covariant returns are going to be implemented anytime
> soon... I looked on the known bugs page, but I didn't see anything
> about it.
In 2.95.x they are currently implemented for cases where no adjustment to
the class pointer is required (e.g. the single inheritance case), but
not for the general case, as the message you are seeing indicates.
> struct A {
> virtual A* Clone();
> };
>
> struct B : public virtual A {
> virtual B* Clone();
> };
>
> The result:
> x.cpp:7: sorry, not implemented: adjusting pointers for covariant returns
> I'm using gcc version 2.95.2 19991024 (release).
I don't know if anyone has done work on this.