This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: operator delete() redefinition errors.
- To: "Wegher, Jeff" <JWegher at neonsoft dot com>
- Subject: Re: operator delete() redefinition errors.
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 24 Jun 1998 03:24:42 -0300
- Cc: "'egcs-bugs at cygnus dot com'" <egcs-bugs at cygnus dot com>
- References: <B1771D049899D011926500A024CA914F89D1E0@mercury.neonsoft.com>
Wegher, Jeff <JWegher@neonsoft.com> writes:
> Running the 980517 snapshot of egcs (egcs-2.91.29) under
> Solaris 2.51 with no special compile options, I'm seeing some
> weird behavior when redefining operator delete() in my classes.
> class Base { public: virtual ~Base() { }
> void operator delete(void*pMemory) { ::operator delete(pMemory); } };
> class Derived : public Base { public:
> void operator delete(void*pMemory) { Base::operator delete(pMemory); } };
> class VirtualDerived : virtual public Base { public:
> void operator delete(void* pMemory) { Base::operator delete(pMemory); } > };
> int main() { Base* pBase = new Base; Derived* pDerived = new
> Derived; VirtualDerived* pVirtualDerived = new VirtualDerived; }
> no suitable operator delete for `Derived'
> no suitable operator delete for `VirtualDerived'
I couldn't reproduce this problem on Solaris 2.6 with the latest
snapshot of egcs, so I believe it is fixed.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil