This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
wchar_t constant not possible
- To: gcc-bugs at gcc dot gnu dot org
- Subject: wchar_t constant not possible
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 10 Sep 2000 11:06:02 -0700
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
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 `------------------------