<div dir="rtl"><div dir="ltr"><font face="arial, sans-serif">+Aaron, </font><span name="Galina Kistanova" class="" style="font-size:12.727272033691406px;font-family:arial,sans-serif"><span dir="ltr">Galina</span></span></div>
<div dir="ltr"><span name="Galina Kistanova" class="" style="font-size:12.727272033691406px;font-family:arial,sans-serif"><br></span></div><div dir="ltr"><span name="Galina Kistanova" class="" style="font-size:12.727272033691406px;font-family:arial,sans-serif"><span name="Galina Kistanova" class="" style="font-size:12.727272033691406px"><span dir="ltr">Galina and Aaron were looking into to_string two weeks ago. The problem reappears every month or so as </span></span></span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">to_string is standard and useful C++11. We should be able to use it. </span></div>
<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">to_string may not be supported under older MingW from <a href="http://mingw.org">mingw.org</a>, see</span></div>
<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div dir="ltr"><font face="arial, sans-serif"> <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015</a></font><br>
</div><div dir="ltr"><font face="arial, sans-serif"><br></font></div><div dir="ltr"><font face="arial, sans-serif">but is supported under MinGW-w64 distribution (32 bit or 64 bit), </font><span style="font-family:arial,sans-serif">with 4.8.2 this compiles and runs with -std=c++11 :</span></div>
<div dir="ltr"><font face="arial, sans-serif"><br></font></div><div dir="ltr"><font face="arial, sans-serif"><div dir="ltr"> #include <iostream></div><div dir="ltr"> #include <string></div><div dir="ltr"> using namespace std;</div>
<div dir="ltr"> int main() {</div><div dir="ltr"> cout << to_string(1234) << std::endl;</div><div dir="ltr"> }</div><div><br></div><div><span style="font-size:12.800000190734863px">Yaron</span><br></div></font></div>
<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><div><br></div><div><br></div></span></div>
<div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2014-08-04 1:11 GMT+03:00 NAKAMURA Takumi <span dir="ltr"><<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</a>></span>:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">See also <a href="http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/builds/7040" target="_blank">http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/builds/7040</a><br>
<br>
I am not sure whether to avoid std::to_string() or drop away incomplete hosts.<br>
In fact in Cygwin's libstdc++-4.8.2, std::to_string is conditionalized,<br>
<br>
#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \<br>
&& !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))<br>
<br>
Cygwin's c++config.h doesn't provide _GLIBCXX_USE_C99. I don't know<br>
how it would be in mingw32 builder.<br>
<br>
2014-08-04 4:30 GMT+09:00 Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>>:<br>
<div><div>><br>
>> On 2014 Jul 25, at 17:45, NAKAMURA Takumi <<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</a>> wrote:<br>
>><br>
>> Author: chapuni<br>
>> Date: Fri Jul 25 19:45:30 2014<br>
>> New Revision: 213994<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=213994&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=213994&view=rev</a><br>
>> Log:<br>
>> IR/UseTest.cpp: Avoid std::to_string() to appease mingw32 bot.<br>
>><br>
>> Modified:<br>
>> llvm/trunk/unittests/IR/UseTest.cpp<br>
>><br>
><br>
> Thanks for this, I didn't see any bot failure emails.<br>
><br>
> Is `std::to_string()` totally unsupported? Let me know and I'll<br>
> add it to the list [1].<br>
><br>
> [1]: <a href="http://llvm.org/docs/CodingStandards.html#supported-c-11-language-and-library-features" target="_blank">http://llvm.org/docs/CodingStandards.html#supported-c-11-language-and-library-features</a><br>
><br>
>> Modified: llvm/trunk/unittests/IR/UseTest.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/UseTest.cpp?rev=213994&r1=213993&r2=213994&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/UseTest.cpp?rev=213994&r1=213993&r2=213994&view=diff</a><br>
>> ==============================================================================<br>
>> --- llvm/trunk/unittests/IR/UseTest.cpp (original)<br>
>> +++ llvm/trunk/unittests/IR/UseTest.cpp Fri Jul 25 19:45:30 2014<br>
>> @@ -13,9 +13,9 @@<br>
>> #include "llvm/IR/Module.h"<br>
>> #include "llvm/IR/User.h"<br>
>> #include "llvm/IR/Instructions.h"<br>
>> +#include "llvm/Support/Format.h"<br>
>> #include "llvm/Support/SourceMgr.h"<br>
>> #include "gtest/gtest.h"<br>
>> -#include <string><br>
>><br>
>> using namespace llvm;<br>
>><br>
>> @@ -37,6 +37,7 @@ TEST(UseTest, sort) {<br>
>> " ret void\n"<br>
>> "}\n";<br>
>> SMDiagnostic Err;<br>
>> + char vnbuf[8];<br>
>> Module *M = ParseAssemblyString(ModuleString, nullptr, Err, C);<br>
>> Function *F = M->getFunction("f");<br>
>> ASSERT_TRUE(F);<br>
>> @@ -48,16 +49,20 @@ TEST(UseTest, sort) {<br>
>> return L.getUser()->getName() < R.getUser()->getName();<br>
>> });<br>
>> unsigned I = 0;<br>
>> - for (User *U : X.users())<br>
>> - EXPECT_EQ("v" + std::to_string(I++), U->getName());<br>
>> + for (User *U : X.users()) {<br>
>> + snprintf(vnbuf, sizeof(vnbuf), "v%u", I++);<br>
>> + EXPECT_EQ(vnbuf, U->getName());<br>
>> + }<br>
>> ASSERT_EQ(8u, I);<br>
>><br>
>> X.sortUseList([](const Use &L, const Use &R) {<br>
>> return L.getUser()->getName() > R.getUser()->getName();<br>
>> });<br>
>> I = 0;<br>
>> - for (User *U : X.users())<br>
>> - EXPECT_EQ("v" + std::to_string((7 - I++)), U->getName());<br>
>> + for (User *U : X.users()) {<br>
>> + snprintf(vnbuf, sizeof(vnbuf), "v%u", (7 - I++));<br>
>> + EXPECT_EQ(vnbuf, U->getName());<br>
>> + }<br>
>> ASSERT_EQ(8u, I);<br>
>> }<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>