[LLVMbugs] [Bug 7668] New: raw_ostream float printing should be portable

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 18 18:37:49 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7668

           Summary: raw_ostream float printing should be portable
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu


Currently, raw_ostream::operator<<(double) uses printf under the covers with
the "%e" format. Unfortunately, this doesn't give portable output across
platforms, notable on Windows we get things like:
  1.700000e+001
whereas on most Unix machines we ill get
  1.700000e+01

This is annoying because we use those routines to print constants in .ll files
(and other places), and so the compiler output is not always deterministic
across machines.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list