[LLVMbugs] [Bug 17604] New: stringstream::width() leads to garbage fill characters

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 16 14:47:27 PDT 2013


            Bug ID: 17604
           Summary: stringstream::width() leads to garbage fill characters
           Product: libc++
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: hhinnant at apple.com
          Reporter: mcmccarty at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11383
  --> http://llvm.org/bugs/attachment.cgi?id=11383&action=edit
example source code

% clang++ -v
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

% clang++ -std=c++11 -stdlib=libc++ stringstream_bug.cpp && ./a.out

See attached source code.  Removing the '-stdlib=libc++' parameter generates
the correct output:

% clang++ -std=c++11 f.cpp && ./a.out
'   123'

Adding an explicit call to sstrm.fill(' ') also works around the problem.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131016/f424a556/attachment.html>

More information about the llvm-bugs mailing list