aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2013-09-23 08:29:14 -0700
committerPaul Pluzhnikov <ppluzhnikov@gcc.gnu.org>2013-09-23 08:29:14 -0700
commit5303f3a48f33df907225aee6c144e4f3a1a35c7b (patch)
tree8748e425e70d2233bdcd07607bca86594f411388 /libstdc++-v3
parenta895a2b8a98464a019e6407e71769eb8aed99013 (diff)
downloadgcc-5303f3a48f33df907225aee6c144e4f3a1a35c7b.zip
gcc-5303f3a48f33df907225aee6c144e4f3a1a35c7b.tar.gz
gcc-5303f3a48f33df907225aee6c144e4f3a1a35c7b.tar.bz2
Unbreak i386 and other builds where size_t != unsigned long.
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
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/src/c++11/snprintf_lite.cc5
2 files changed, 8 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 069bd40..ab960e7 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/src/c++11/snprintf_lite.cc b/libstdc++-v3/src/c++11/snprintf_lite.cc
index 9509c42..02a8187 100644
--- a/libstdc++-v3/src/c++11/snprintf_lite.cc
+++ b/libstdc++-v3/src/c++11/snprintf_lite.cc
@@ -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)