This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

PR3860 and wofstreams


Hi all,

in the last day I tried to understand more of PR3860.
The testcase is very simple, only:

#include <fstream>

int main( int, char *[] )
{
    std::wofstream ws( "t.out" );
    ws << L"hello" << std::endl;
}

On i686-pc-linux-gnu both 3.0.2 and 3.1 fill t.out with "he", which in
fact is in ASCII 68 00 00 00 65 00. More generally trying to output
anything leads to three additional zeros appended to each char and the
outputs has the expected length but contains only about 1/4 of the
expected chars.

I'm beginning to believe that this is indeed too difficult to debug for
me. I'm particularly worried by the fact that in 27_io there are *no*
tests for general wofstreams (vs wcin, wcout, wcerr, wclog). Are they
supposed to be functional? Is some core functionality for wofstreams
still missing to date?

Thanks,
Paolo.






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