This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] Make vector::at() assertion message more useful (try #2)
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, Daniel Krügler <daniel dot kruegler at gmail dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 23 Sep 2013 07:48:40 -0700
- Subject: Re: [patch] Make vector::at() assertion message more useful (try #2)
- Authentication-results: sourceware.org; auth=none
- References: <ye6qhae0qpf8 dot fsf at elbrus2 dot mtv dot corp dot google dot com> <CAGNvRgDfHf6pYmBYC66HHhj6RobhiaiAAVEKj1FDxSWGxbYFTg at mail dot gmail dot com> <CALoOobMf3u8R_DVW5b2eRy05fBpB5unhriLMYdUEkT_E3DwtaA at mail dot gmail dot com> <CAGNvRgD6mK=-n7QhK=-NtfXZHOpCniXKc-riWUNfqZeVa8xufQ at mail dot gmail dot com> <CALoOobO6XEsrSM6jJFCQ=n00iY8qM=eujs-=LixNZyuya5f-cA at mail dot gmail dot com> <5232E2AF dot 4000106 at oracle dot com> <CALoOobMejGJLVVCszP8Joa+4B21UbvK4chyFUnjiCNPP0GJF0A at mail dot gmail dot com> <mvma9j35377 dot fsf at hawking dot suse dot de> <52402567 dot 2080407 at oracle dot com>
On 9/23/13 4:26 AM, Paolo Carlini wrote:
m68k-linux/./libstdc++-v3/src/.libs/libstdc++.so: undefined reference
to `int std::__int_to_char<char, unsigned int>(char*, unsigned int,
char const*, std::_Ios_Fmtflags, bool)'
Reproduced on i686.
Sorry about the trouble ...
I would say, either make sure to use only those two in the new
code
Testing this patch:
Index: libstdc++-v3/src/c++11/snprintf_lite.cc
===================================================================
--- libstdc++-v3/src/c++11/snprintf_lite.cc (revision 202830)
+++ libstdc++-v3/src/c++11/snprintf_lite.cc (working copy)
@@ -70,9 +70,10 @@
int __concat_size_t(char *__buf, size_t __bufsize, size_t __val)
{
// Long enough for decimal representation.
- int __ilen = 3 * sizeof(__val);
+ unsigned long long __val_ull = __val;
+ int __ilen = 3 * sizeof(__val_ull);
char *__cs = static_cast<char*>(__builtin_alloca(__ilen));
- size_t __len = std::__int_to_char(__cs + __ilen, __val,
+ size_t __len = std::__int_to_char(__cs + __ilen, __val_ull,
std::__num_base::_S_atoms_out,
std::ios_base::dec, true);
if (__bufsize < __len)