On 9/23/13 4:26 AM, Paolo Carlini wrote:

m68k-linux/./libstdc++-v3/src/.libs/libstdc++.so: undefined reference
to `int std::__int_to_char<char, unsigned int>(char*, unsigned int,
char const*, std::_Ios_Fmtflags, bool)'

Reproduced on i686.
Sorry about the trouble ...

I would say, either make sure to use only those two in the new
code

Testing this patch:

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)

Reply via email to