[LLVMdev] Convert C++ to C. What is 0x0p+0 ?

Reid Spencer rspencer at reidspencer.com
Sun Nov 5 14:23:42 PST 2006


On Sun, 2006-11-05 at 13:48 -0800, Bill Wendling wrote:
> I supposed you could always hack the CBE to have it produce  
> traditional floating point numbers (like 0.0 or whatever) using "%f"  
> instead of "%a". However, you might have problems with precision  
> during comparisons. I.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.




More information about the llvm-dev mailing list