V3 problems
Joe Buck
jbuck@racerx.synopsys.com
Mon Feb 5 13:08:00 GMT 2001
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.
More information about the Gcc
mailing list