[patch] Make vector::at() assertion message more useful (try #2)
Paul Pluzhnikov
ppluzhnikov@google.com
Mon Sep 23 15:29:00 GMT 2013
On 9/23/13 7:48 AM, Paul Pluzhnikov wrote:
> Testing this patch:
libstdc++ tests finished with
RUNTESTFLAGS='--target_board=unix\{-m32,-m64\}'
Committed as r202832.
Sorry about the trouble.
--
2013-09-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* src/c++11/snprintf_lite.cc (__concat_size_t): Use only
std::__int_to_char<unsigned long long>()
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)
More information about the Libstdc++
mailing list