This is the mail archive of the
mailing list for the libstdc++ project.
Small problem in testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-[1-4].cc
- From: Pétur Runólfsson <peturr02 at ru dot is>
- To: <pcarlini at unitus dot it>
- Cc: <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 1 Jul 2003 19:54:34 -0000
- Subject: Small problem in testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-[1-4].cc
There is a small problem in the test cases for PR 11305. After this change:
- wint_t n1 = fb.sputc(0x20000000);
- wint_t n2 = fb.sputc(0x40000000);
+ wfilebuf::int_type n1 = fb.sputc(L'i');
+ wfilebuf::int_type n2 = fb.sputc(L'a');
the test cases will no longer detect the presence of the bug.
The problem was that overflow failed to convert characters whose UTF-8
representation is larger than sizeof(wchar_t); 0x20000000 and 0x40000000
are two such characters (6 bytes each) but L'i' and L'a' only require a
single byte each ('i' and 'a').