This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/17005] wide character strings don't work on HP-UX 11i using gcc 3.4.1
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Aug 2004 18:06:39 -0000
- Subject: [Bug libstdc++/17005] wide character strings don't work on HP-UX 11i using gcc 3.4.1
- References: <20040812163817.17005.jerrydy@sbcglobal.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pcarlini at suse dot de 2004-08-15 18:06 -------
Hi everyone, hi Dave.
> The wchar_t * in result1 is null. I'm not sure why.
You mean *result1.data() is a '\0'? Or result1.data() is a null pointer?
In the first case time_put::do_put is totally failing, in the last case even
worse things are happening...
Anyway, time_put::do_put basically does this, in "C terms":
#include <locale.h>
#include <time.h>
#include <wchar.h>
#include <string.h>
#include <assert.h>
int main()
{
wchar_t __s[64];
int __maxlen = 64;
wchar_t __format[3] = L"%a";
struct tm __tm = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
wcsftime(__s, __maxlen, __format, &__tm);
assert(wcscmp(__s, L"Sun") == 0);
}
Can you debug a bit further? Thanks, Paolo.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17005