This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

wchar_t constant not possible


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   `------------------------

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