search for: ftostr

Displaying 7 results from an estimated 7 matches for "ftostr".

Did you mean: utostr
2006 Nov 05
1
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
....e., if you have something like "if (a == > 37.927)", it may not work. The "hack" has already been implemented. As I mentioned in my last email, all you need to do is configure LLVM with --disable-cbe-printf-a and it will avoid using the %a conversion token and instead use ftostr. Reid.
2008 Jul 01
0
[LLVMdev] Dejagnu Tests
...y printf) > is truncating the minus sign from the output deeming it pointless in > the > case of zero, whereas on a linux box it does not. Not sure quite > what to > do there yet, as -0 == 0 mathematically, but not in floating point > representation. The conversion is done by ftostr which uses sprintf("%20.6e"). We may need to special-case negative zero there. > There were some others too, but off of the top of my head I cant > remember. > > We should be able to send you guys a bunch of patches for testing > soon. > I think we are down to 6 fai...
2010 Oct 25
1
[LLVMdev] sprintf -> snprintf conversion
...------------- next part -------------- Index: include/llvm/ADT/StringExtras.h =================================================================== --- include/llvm/ADT/StringExtras.h (revision 117247) +++ include/llvm/ADT/StringExtras.h (working copy) @@ -102,7 +102,7 @@ static inline std::string ftostr(double V) { char Buffer[200]; - sprintf(Buffer, "%20.6e", V); + snprintf(Buffer, sizeof(Buffer), "%20.6e", V); char *B = Buffer; while (*B == ' ') ++B; return B; Index: lib/System/Errno.cpp ===================================================================...
2008 Jul 01
4
[LLVMdev] Dejagnu Tests
Hi, Tanya M. Lattner wrote: >> We were wondering if *all* of the dejagnu tests should pass (in the >> sense that no result should be unexpected), because we have a few failed >> tests on our build. > > make check should always be clean. However, sometimes people do commit > changes that impact platforms they are not able to test on and we do have > the occasional
2006 Nov 05
0
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
On Nov 5, 2006, at 2:30 AM, Mohd-Hanafiah Abdullah wrote: > On Sat, 2006-11-04 at 21:06 -0800, Reid Spencer wrote: >>> In the resulting file foo.cbe.c there are many occurences of '0x0p >>> +0'. >>> What is it used for? Here's a code snippet from the file foo.cbe.c >>> >>> if ((ltmp_126_2 > 0x0p+0)) { >>> goto
2006 Nov 05
4
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
On Sat, 2006-11-04 at 21:06 -0800, Reid Spencer wrote: > Hi Napi, > > On Sun, 2006-11-05 at 12:40 +0800, Mohd-Hanafiah Abdullah wrote: > > Hi: > > > > I'm interested in using llvm to convert C++ code to C code. > > I used the following command to do this: > > > > % llvm-g++ -c foo.cpp -o - | llc -march=c -o foo.cbe.c > > Yup, that'll
2007 Jul 15
3
[LLVMdev] Floating point constants (bug?)
>From the language guide: "The one non-intuitive notation for constants is the optional hexadecimal form of floating point constants. For example, the form 'double 0x432ff973cafa8000' is equivalent to (but harder to read than) 'double 4.5e+15'. The only time hexadecimal floating point constants are required (and the only time that they are generated by the disassembler) is