This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/41037] New: dec not set in cerr flags
- From: "gcc-bugzilla at contacts dot eelis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2009 23:01:25 -0000
- Subject: [Bug libstdc++/41037] New: dec not set in cerr flags
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider:
#include <iostream>
#include <cstdio>
int main()
{ std::printf("%d\n", std::cerr.flags() & std::ios_base::dec); }
In 27.3.1p5, the standard states:
After the object cerr is initialized, cerr.flags() & unitbuf is
nonzero. Its state is otherwise the same as required for
basic_ios<char>::init (27.4.4.1).
In 27.4.4.1p3, it is specified that flags() is set to skipws|dec.
Hence, the program above should not output "0". But it does.
--
Summary: dec not set in cerr flags
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at contacts dot eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41037