[LLVMbugs] [Bug 11871] New: cin does not properly parse double from a certain input stream

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 27 08:38:52 PST 2012


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

             Bug #: 11871
           Summary: cin does not properly parse double from a certain
                    input stream
           Product: libc++
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: rework11 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 7964
  --> http://llvm.org/bugs/attachment.cgi?id=7964
libc++ cin parsing test

Given "2+" or "2-" as an input stream from keyboard, cin fails to parse it and
makes cin.fail() true instead of reading in "2" and leaving "+" or "-" behind
in the input stream.

Attachment is the code to reproduce this behavior; it occurs only when linked
against libc++. After executing the code, type in any floating-point number
immediately followed by a + or - character without a space in-between.

--
Mac OS X 10.7.2
apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix

-- 
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