PATCH: Recent conversion to explicit instantiation model broke alpha*-*-freebsd*

Loren James Rittle
Wed Feb 7 15:55:00 GMT 2001

Some static builds now fail with:

/libstdc++-v3/include/bits/stl_uninitialized.h:190: undefined reference to `std:
:__normal_iterator<std::locale::facet**, std::vector<std::locale::facet*, std::a
llocator<std::locale::facet*> > > std::fill_n<std::__normal_iterator<std::locale
::facet**, std::vector<std::locale::facet*, std::allocator<std::locale::facet*> 
> >, unsigned long, std::locale::facet*>(std::__normal_iterator<std::locale::fac
et**, std::vector<std::locale::facet*, std::allocator<std::locale::facet*> > >, 
unsigned long, std::locale::facet* const&)'

and all shared builds now fail with something similar (except the
helpful source line reference to [...]/stl_uninitialized.h:190 is missing).

This patch fixes the problem for alpha*-*-freebsd*:

(However, it is unclear if all targets should be explicitly
 instantiating both [...]unsigned[...] and [...]unsigned long[...]
 versions of the template since, at least, alpha*-*-freebsd* doesn't
 appear to require the former.  I have no clue on how to trace
 template instantiations chains, statically or with gdb, back to the
 root typedef, which in this case is ``unsigned'' on most platforms
 but ``unsigned long'' on alpha*-*-freebsd* thus this is the best
 patch I can produce.)

2001-02-07  Loren J. Rittle  <>

	* src/ Explicitly instantiate more functions.

Index: libstdc++-v3/src/
RCS file: /cvs/gcc/egcs/libstdc++-v3/src/,v
retrieving revision 1.14
diff -c -r1.14
***	2001/02/07 01:54:21	1.14
---	2001/02/07 22:44:52
*** 306,311 ****
--- 306,318 ----
  	   unsigned, locale::facet* const&);
+     __normal_iterator<locale::facet**, 
+                       vector<locale::facet*> >
+     fill_n(__normal_iterator<locale::facet**, 
+ 	                     vector<locale::facet*> >,
+ 	   unsigned long, locale::facet* const&);
+   template
      fill (__normal_iterator<locale::facet**, 
  	                    vector<locale::facet*> >,

More information about the Libstdc++ mailing list