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

Reid Spencer rspencer at reidspencer.com
Sun Nov 5 19:08:35 PST 2006


BTW,

Emil Mikulic suggested that this be implemented with a command line
switch so that whenever the CBE is invoked you can tell it to avoid
printf-a. That's a pretty good idea and I'll probably flip the
implementation of this to use a command line switch, but I'm not sure
when I'll get to that.  Patches welcome.

Reid.

On Sun, 2006-11-05 at 14:23 -0800, Reid Spencer wrote:
> 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.
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list