#include <iostream>

int main()
{
    //std::cout << "Hello!" << std::endl;
    std::wcout << L"Wello!" << std::endl;
    std::cout << "Hello!" << std::endl;
    return 0;
}
//--------------------------------------------------------

$ g++ test.cpp
$ ./a.out
Wello!

There is no output from std::cout, but if first line is uncommented:

$ g++ test.cpp
$ ./a.out
Hello!
Wello!
Hello!

It seems to work well with GCC versions 3.3 and 3.2 and fails with +3.4.
I've checked it on Debian Testing and Fedora Core 3 (standard distribution
compilers). It works fine on Solaris 8 GCC 3.4.


-- 
           Summary: Problem with mixing wcout and cout
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kuba at parasoft dot com dot pl


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27569

Reply via email to