"Christopher Cordahi" <[EMAIL PROTECTED]> writes:
> On 06/02/07, Andrew Lunn <[EMAIL PROTECTED]> wrote:
[...]
> I created and destroyed a C++ object with a virtual destructor that
> was on the stack and the the free function wasn't included in the
> object code since there wasn't any dynamic memory.
Depending on GCC version, it could be not enough to just have one virtual
destructor, -- you may need to have inheritance to see the problem, e.g.:
struct A {
virtual ~A();
};
struct B: public A {
virtual ~B();
};
A::~A() {}
B::~B() {}
When I compile this file to assembly, I see a call to __builtin_delete
using old versions of GCC (2.95.x), and calls to an external symbol
_ZdlPv using newer version of GCC :(
-- Sergei Organov.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss