This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Missing explicit instantiations in libstdc++ (was Re:Unreviewed
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>, John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: Jason Merrill <jason at redhat dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 03 Dec 2001 22:18:26 -0800
- Subject: Re: Missing explicit instantiations in libstdc++ (was Re:Unreviewed
--On Monday, December 03, 2001 02:57:05 PM -0800 Benjamin Kosnik
<bkoz@redhat.com> wrote:
>
>> std::basic_string<unsigned char, std::char_traits<unsigned char>,
>> std::allocator<unsigned char> >::_Rep::_S_max_size(data)
>>
>> or in mangled form
>>
>> _ZNSbIhSt11char_traitsIhESaIhEE4_Rep11_S_max_sizeE
>
> Oh. Note that src/string-inst.cc is instantiating std::string, which is
> std::basic_string<char>
>
> not
>
> std::basic_string<unsigned char>
>
> This (the unsigned instantiation) should be implicitly instantiated from
> the test case in question, namely 22_locale/collate.cc. Apparently it is
> not, for some reason.
Remember that you need explicit instantiations for systems without
weak support.
The V3 tests that instantiate types from the library that are
not preinstantiated should contains *explicit* instantiations so
that the tests work the same on targets without weak symbols.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com