This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: V3 problems
- To: dje at watson dot ibm dot com
- Subject: Re: V3 problems
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 05 Feb 2001 11:11:00 -0800
- Cc: bkoz at nabi dot net, gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <mark@codesourcery.com><200102051858.NAA38966@mal-ach.watson.ibm.com>
>>>>> "David" == David Edelsohn <dje@watson.ibm.com> writes:
David> Yes, this lack of explicit instantiations is why Gaby and I were
David> adding instantiations of locale-inst.cc and bitset.cc in November.
David> Why are we using any implicit instantiation in V3?
That is a fair question.
It is convenient on platforms with weak symbols, of course. However,
the only way to avoid breaking platforms without weak symbols on a
regular basis is to use -fno-implicit-templates.
The V3 Makefile says:
# 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.
misc-inst.o: misc-inst.cc
$(CXXCOMPILE) -fimplicit-templates -c $<
misc-inst.lo: misc-inst.cc
$(LTCXXCOMPILE) -fimplicit-templates -c $<
locale-inst.o: locale-inst.cc
$(CXXCOMPILE) -fimplicit-templates -c $<
locale-inst.lo: locale-inst.cc
$(LTCXXCOMPILE) -fimplicit-templates -c $<
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 will look into that, on GNU/Linux.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com