]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Unbreak i386 and other builds where size_t != unsigned long.
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Mon, 23 Sep 2013 15:29:14 +0000 (08:29 -0700)
committerPaul Pluzhnikov <ppluzhnikov@gcc.gnu.org>
Mon, 23 Sep 2013 15:29:14 +0000 (08:29 -0700)
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>()

From-SVN: r202832

libstdc++-v3/ChangeLog
libstdc++-v3/src/c++11/snprintf_lite.cc

index 069bd405123e50b02db41cabd23a075af9df3fec..ab960e7ffeb287f505965e65416e0bdf5cb5032d 100644 (file)
@@ -1,3 +1,8 @@
+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>()
+
 2013-09-21  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
        * include/bits/functexcept.h (__throw_out_of_range_fmt): New.
index 9509c4210f9511773f59c00c6f73a20884020c79..02a818744cb391a49e61c3861a969c349b80702d 100644 (file)
@@ -70,9 +70,10 @@ namespace __gnu_cxx {
   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)