This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: Revert __use_cache relocation


Carlo Wood writes:
 > On Tue, Jul 01, 2003 at 11:51:47AM +0200, Carlo Wood wrote:
 > > On Tue, Jul 01, 2003 at 01:38:53AM -0400, Jerry Quinn wrote:
 > > > This patch http://gcc.gnu.org/ml/libstdc++/2003-06/msg00368.html is
 > > > causing the instantiation problems I'm getting in
 > > > http://gcc.gnu.org/ml/libstdc++/2003-07/msg00003.html
 > > > 
 > > > Reverting this patch until we can figure out how to solve this.
 > > > 
 > > > Index: include/bits/locale_facets.tcc
 > > > +    const __numpunct_cache<char>&
 > > > +    __use_cache(const locale& __loc);
 > > 
 > > If you put this in locale_facets.tcc and #include
 > > it in a compilation unit, then it will instantiate
 > > std::numpunct<char>::id  no?
 > > 
 > > So, if you include it in two different compilation
 > > units (two different *.cc file #include it), then
 > > you get a redefinition.

The library files get built with -fno-implicit-instantiation.  The one
exception is concept-inst.cc.  That's so that it can instantiate a
whole raft of stuff to perform concept checks (and beyond that, I
don't know what's going on in there).

The funny thing is, moving the code into the header file worked fine a
couple of days ago.  That was before the recent flurry of qualifying
everything.  I guess I'll have to do a search to find which patch
changes things.  Alternatively, concept-inst.cc could be forced to
explicitly instantiate anything that's missing.

Hey, wait... isn't the linker supposed to clean multiple instantiation
symbols up?

 > Atually, I didn't even know if they was a normal
 > patch or a reversed patch - so I don't know that
 > code is added or removed :).

It was reversed, moving the code back into the .cc file :-)

Jerry Quinn


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