Thanks to John's example above I think I now understand what's going on in the Itanium ABI and I think I know where to go now to fix the incompatibility.
On Wed, Dec 5, 2012 at 6:58 PM, João Matos <[email protected]> wrote: > I've researched MS ctor/dtor behaviour a bit, check PR 12784 > (http://llvm.org/bugs/show_bug.cgi?id=12784) for a simple file that shows > the different types we will expect. > > On Wed, Dec 5, 2012 at 2:28 PM, Timur Iskhodzhanov <[email protected]> > wrote: >> >> On Tue, Dec 4, 2012 at 8:09 PM, Timur Iskhodzhanov <[email protected]> >> wrote: >> >>> d) The complete/deleting dtor logic will change when we support MSVC >> >>> dtor types, but not now >> >>> [shouldn't matter now that we still don't support virtual >> >>> inheritance] >> >> >> >> You're thinking about complete vs. base destructors. Complete vs. >> >> deleting >> >> destructors isn't about virtual inheritance; it's about whether the >> >> destructor >> >> calls operator delete. >> > Yeah, now I see it... [see below] >> > >> >> (This is important because the 'delete' operator uses >> >> the operator delete from the most-derived class.) >> >> >> >> How does MSVC handle the difference between >> >> foo->~Foo(); // virtually dispatched but doesn't call operator delete >> >> and >> >> delete foo; // virtually dispatched and calls operator delete >> >> ? >> > Clang with my patch behaves badly on such code. >> > It seems to work fine at least on simple code where you don't use >> > virtual destructors. >> > >> > Actually, the whole idea of base vs complete dtors doesn't apply to >> > -cxx-abi microsoft. >> > Anyways, had plans to work on ctor and dtor compatibility as a >> > separate patch - is that OK? >> > I've put a couple of more FIXME into the code for that. (in >> > ::AddMethod and ::ComputeMethodVTableIndices). >> >> Attached is the patch which is similar to bug_13231_2 but puts the >> complete dtor rather than deleting. >> Both are basically broken anyways but at least you can choose what you >> think fits better :) >> Investigating compatible dtor behavior is definitely on my TODO-soon >> list now [as a separate change if this works] >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >> > > > > -- > João Matos _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
