On 10/27/2017 02:18 PM, Jakub Jelinek wrote:
On Fri, Oct 27, 2017 at 02:10:10PM -0400, Jason Merrill wrote:

If the point is to clear the vptr, why are you also clearing the rest
of the object?

Can there be multiple vptr pointers in the object or is there just one?
Even if there can be multiple, perhaps earlier destructors would
have cleared those other vptr pointers though.

There can be multiple vptrs in an object (multiple polymorphic bases). However, each such case will have its own base dtor invoked, as you postulated. In fact, there may be a base dtor invoked that maps onto the single vptr, in the cases when we're singly inheriting a polymorphic base.

nathan

[polymorphic here includes the case of having virtual bases].

--
Nathan Sidwell

Reply via email to