This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: wchar_t constant not possible
- To: drepper at cygnus dot com (Ulrich Drepper)
- Subject: Re: wchar_t constant not possible
- From: Andreas Jaeger <aj at suse dot de>
- Date: 12 Sep 2000 09:22:56 +0200
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <m3its42kc5.fsf@otr.mynet.cygnus.com>
>>>>> Ulrich Drepper writes:
> 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.
Let's add this test to gcc.c-torture/execute, it still fails with the
current gcc CVS version.
Ok to commit?
Andreas
2000-09-12 Andreas Jaeger <aj@suse.de>
* gcc.c-torture/execute/widechar-2.c: Test for wchar_t constant by
Ulrich Drepper <drepper@redhat.com>.
============================================================
Index: gcc/testsuite/gcc.c-torture/execute/widechar-2.c
--- gcc/testsuite/gcc.c-torture/execute/widechar-2.c created
+++ gcc/testsuite/gcc.c-torture/execute/widechar-2.c Tue Sep 12 09:20:21 2000 1.1
@@ -0,0 +1,9 @@
+#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';
+}
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj