This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] PATCH to libstdc++ for forced unwind handling (c++/28145)


Jason Merrill <jason@redhat.com> writes:

> PaweÅ Sikora wrote:
> > On Thursday 03 of May 2007 16:21:01 Jason Merrill wrote:
> >> Yes, but due to an oversight when we were designing the ABI, the
> >> destructor needs to be non-pure for it to control the output of the
> >> type_info.
> > i don't know the type info implementation details but if you need
> > the destructor body and vtable for __forced_unwind you can add
> > an empty destructor definition in library still having
> > pure class declaration without ugly __pure() method.
> 
> The goal here is to have the vtable and type_info emitted only in the
> library.  Pure virtuals are not considered for determining where the
> vtable goes, so we need a non-pure virtual function.  This is a flaw
> in the ABI, but by the time I noticed it it was too late to change.

It is really an ABI issue as such?  Couldn't we invent a new compiler
attribute to defer instantiation and then use an explicit
instantiation?

Not that I'm necessarily recommending that here, but I'm curious if
there is a reason why that would not work.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]