wchar_t constant not possible
Ulrich Drepper
drepper@redhat.com
Sun Sep 10 11:35:00 GMT 2000
I don't know who recently played with these things in gcc but the
generation of wide char string constants is completely screwed in
current mainline compiler on x86. The strange thing is that it works
on Arm (the only othe rplatform I test). The strings are generated as
all zero bytes. Please consider adding the following tiny program to
the test suite.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <wchar.h>
const wchar_t ws[] = L"foo";
int
main (void)
{
return ws[0] != L'f' || ws[1] != L'o' || ws[2] != L'o' || ws[3] != L'\0';
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Gcc-bugs
mailing list