This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: place to instantiate a template missing from libstdc++-v3.a
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: "Jan Beulich" <JBeulich at novell dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 1 Sep 2005 12:36:50 -0500
- Subject: Re: place to instantiate a template missing from libstdc++-v3.a
- References: <430F35940200007800023025@emea1-mh.id2.novell.com>
> On a platform using config/locale/generic/c_locale.cc and not having any
> of strtof(), finitef(), and finite(), the code makes use of isinf(),
> which is forced to be a template under certain additional conditions
> that are also met for this target.
>From looking at cmath.h, I would be surprised if
template<typename _Tp>
int
__capture_isinf(_Tp __f) { return isinf(__f); }
template<typename _Tp>
int
isinf(_Tp __f) { return __gnu_cxx::__capture_isinf(__f); }
isn't correctly inlined, leaving just a reference to the C99 isinf
function. If this isn't the case, it should be.
>Since everything gets compiled with
> -fno-implicit-templates, an instantiation of this template must be added
> somewhere, but to me adding it to config/locale/generic/c_locale.cc
> itself seems to be a rather bad idea. Hence I'd like to understand where
> the proper place for adding such an explicit instantiation would be.
You should fix the <cmath> header to inline this stuff.
-benjamin