This is the mail archive of the gcc@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]

Re: V3 problems


Mark writes:

>   # We have to handle misc-inst.cc and locale-inst.cc in a special way
>   # since we cannot instantiate all classes due to missing definitions
>   # for things like vptrs, type_info bits, etc. when using
>   # -fno-implicit-templates.
> ...

> That comment sounds wrong to me.  If it is correct, then I think we
> have a bug in the compiler proper.  There is no reason that the vptr
> and type_info bits shouldn't be emitted when an explicit instantiation
> is done; in fact, they should be.

I think that the proper way to handle this is to use the same heuristic
that is used elsewhere: the definition for the vtbl and type_info stuff
goes in the same .o file that defines the first noninline, nonpure virtual
function.  If an .o file gets an definition of that function due to
explicit template expansion, it should also get a definition of the vtbl
and type_info bits.


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