This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add missing explicit instantiation for std::lower_bound template
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, FranÃois Dumont <fdumont at gcc dot gnu dot org>, Jonathan Wakely <jwakely dot gcc at gmail dot com>, Benjamin De Kosnik <bkoz at redhat dot com>
- Date: Wed, 06 Feb 2013 09:34:06 +0100
- Subject: Re: [PATCH] Add missing explicit instantiation for std::lower_bound template
- References: <8738xcm5xc.fsf@redhat.com> <51112F05.2070404@oracle.com>
Paolo Carlini <paolo.carlini@oracle.com> writes:
>> Since commit r195676[1], it looks like
>> libstdc++-v3/src/c++11/hashtable_c++0x.cc is missing an explicit
>> instantiation for std::lower_bound. This leads to libstdc++.so having
>> the symbol for that (missing) instantiation be undefined, thus
>> preventing executables from being linked with libstdc++.
> Note that I can confirm this only if I build with less optimization
> than the default -O2, say -O. That may explain why nobody noticed
> earlier.
Ah, right. It's true that I build on my machine without optimization so
that I can debug problems that show up on my local machine. And I
always forget that I do that.
>> The patchlet below seems to fixed the issue for me.
>
> Indeed, I think we want something like that. Thanks. In terms of nits,
> formatting and types (who knows, maybe on some systems a std::size_t
> is an unsigned long long), I would write something like the
> attached. Please double check that it works for you and go ahead.
Great! Your amendments work well for me. I committed it to trunk.
Thank you.
--
Dodji