Date: Sat, 12 Mar 2016 08:27:14 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 207918] C++ ostream operator << broken for unsigned long long when using showbase with octal format Message-ID: <bug-207918-15@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207918 Bug ID: 207918 Summary: C++ ostream operator << broken for unsigned long long when using showbase with octal format Product: Base System Version: 10.3-BETA2 Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: dwmcrobb@me.com CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org C++ library issue. Using showbase with ostreams causes truncation of unsigned long long when output format is octal. #include <iostream> #include <iomanip> int main(int argc, char *argv[]) { std::cout << std::oct; std::cout << std::numeric_limits<unsigned long long>::max() << '\n'; std::cout << std::showbase << std::numeric_limits<unsigned long long>::max() << '\n'; return 0; } Outputs: 1777777777777777777777 0177777777777777777777 Problem exists for 10.3-PRERELEASE r296556 for amd64 as well as 11.0-CURRENT r292991 for arm. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207918-15>