wchar_t constant not possible
Andreas Jaeger
aj@suse.de
Tue Sep 12 00:24:00 GMT 2000
>>>>> 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
More information about the Gcc-patches
mailing list