Bug 42552 - std::wcerr followed by std::cerr lacks std:cerr output
Summary: std::wcerr followed by std::cerr lacks std:cerr output
Status: RESOLVED DUPLICATE of bug 37557
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-30 12:41 UTC by Debian GCC Maintainers
Modified: 2009-12-30 12:51 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2009-12-30 12:41:26 UTC
forwarding, seen with current branches and trunk

  Matthias

#include <iostream>

int main()
{
    std::wcerr << L"Hello, world!" << std::endl;

    std::cerr << "!dlrow ,olleH" << std::endl;
}

when compiled, will only output "Hello, world!", and the subsequent string will not be output.

However,

#include <iostream>

int main()
{
    std::cerr << "Foobar" << std::endl;
    std::wcerr << L"Hello, world!" << std::endl;
    std::cerr << "!dlrow ,olleH" << std::endl;
}

works as expected, printing out all three strings.
Comment 1 Paolo Carlini 2009-12-30 12:51:20 UTC
If you are looking for a totally unsupported (can go away at any moment) "workaround" (it's a bug that it does what you want), see PR11705

*** This bug has been marked as a duplicate of 37557 ***