This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Make vector::at() assertion message more useful (try #2)

On 9/23/13 7:48 AM, Paul Pluzhnikov wrote:

Testing this patch:

libstdc++ tests finished with

Committed as r202832.

Sorry about the trouble.

2013-09-23  Paul Pluzhnikov  <>

	* src/c++11/ (__concat_size_t): Use only
	std::__int_to_char<unsigned long long>()

Index: libstdc++-v3/src/c++11/
--- libstdc++-v3/src/c++11/	(revision 202830)
+++ libstdc++-v3/src/c++11/	(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::ios_base::dec, true);
     if (__bufsize < __len)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]