When using covariant returns (such as in "virtual constructors") in conjunction with virtual inheritance, g++ gives the error: "foo.cpp:8: sorry, not implemented: adjusting pointers for covariant returns" Behavior for non-virtual inheritance is correct. I tried this with gcc 2.95.3, gcc 3.0 and the latest snapshot using CodeSourcery's online compiler as of July 17, 2001. Release: 3.0 Environment: System: SunOS dortmund 5.6 Generic_105181-05 sun4u sparc SUNW,Ultra-60 Architecture: sun4 host: sparc-sun-solaris2.6 build: sparc-sun-solaris2.6 target: sparc-sun-solaris2.6 configured with: ../gcc-3.0/configure --prefix=/usr/local/gcc3 How-To-Repeat: class A { public: virtual A* clone() const = 0; }; class B: public virtual A { public: virtual B* clone() const {return(new B(*this));} }; int main() { B* b = new B; B* c = b->clone(); return 0; }
State-Changed-From-To: open->analyzed State-Changed-Why: confirmed
State-Changed-From-To: analyzed->closed State-Changed-Why: 2002-12-03 Nathan Sidwell <nathan@codesourcery.com> Implement covariant returns. this will appear in 3.4, not 3.3 (unfortunately)