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


>>>>> "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

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