summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorppluzhnikov <ppluzhnikov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-23 15:29:14 +0000
committerppluzhnikov <ppluzhnikov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-23 15:29:14 +0000
commit60540b6b018c20e57a9c8fd73c0b3ded82987bbd (patch)
tree8748e425e70d2233bdcd07607bca86594f411388 /libstdc++-v3/src
parent3c59e4a7c9b322cb2ee67c66247995c7f95ae914 (diff)
downloadppe42-gcc-60540b6b018c20e57a9c8fd73c0b3ded82987bbd.tar.gz
ppe42-gcc-60540b6b018c20e57a9c8fd73c0b3ded82987bbd.zip
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>() git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202832 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/c++11/snprintf_lite.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libstdc++-v3/src/c++11/snprintf_lite.cc b/libstdc++-v3/src/c++11/snprintf_lite.cc
index 9509c4210f9..02a818744cb 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)
OpenPOWER on IntegriCloud