This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/41037] New: dec not set in cerr flags


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]