[LLVMbugs] [Bug 15740] New: Long octals from strings using stringstreams

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 13 04:06:49 PDT 2013


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

            Bug ID: 15740
           Summary: Long octals from strings using stringstreams
           Product: libc++
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: hhinnant at apple.com
          Reporter: luke.clemente at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following works with libstdc++. Tested using current svn.

#include <sstream>
#include <cassert>

int main() {
  std::stringstream ss;
  long l;
  // This works
  ss.str("01777777777777777777777");
  ss >> std::oct >> l;
  assert(ss.fail());
  // This doesn't work
  ss.clear();
  ss.str("0000000000000000001777777777777777777777");
  ss >> std::oct >> l;
  assert(ss.fail());
}

-- 
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/20130413/b0da6185/attachment.html>


More information about the llvm-bugs mailing list