[LLVMbugs] [Bug 21428] New: Truncated output of negative int64_t to std::ostream with std::hex
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Oct 31 03:20:45 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21428
Bug ID: 21428
Summary: Truncated output of negative int64_t to std::ostream
with std::hex
Product: libc++
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: kyle at mayeses.com
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
Classification: Unclassified
Created attachment 13263
--> http://llvm.org/bugs/attachment.cgi?id=13263&action=edit
A minimal example of the problem.
When outputting any negative int64_t to a std::ostream after having used the
std::hex format flag, the output has the last digit truncated.
std::cout << std::hex << static_cast<int64_t>(-1) << std::endl;
Expected output: 177777777777777777777
Actual output: 1777777777777777777777
--
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/20141031/7b046bd2/attachment.html>
More information about the llvm-bugs
mailing list