cpplib and endianness problems

Neil Booth neil@daikokuya.demon.co.uk
Wed Jan 10 23:54:00 GMT 2001


Jamie Lokier wrote:-

> Does it pass with 0x1234?  If so, wchar_t is signed and getting
> sign-extended.

Ah, I see.  OK, this adds that test too; let's see.  If this passes,
I'll remove the other one.

Neil.

	* gcc.dg/cpp/if-2.c: Add wide char test without sign extension.

Index: gcc.dg/cpp/if-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/cpp/if-2.c,v
retrieving revision 1.2
diff -u -p -r1.2 if-2.c
--- if-2.c	2000/12/11 07:46:25	1.2
+++ if-2.c	2001/01/11 07:51:54
@@ -13,6 +13,10 @@
 #error 0xfeed	/* { dg-bogus "error" "wide charconst recognition 2" } */
 #endif
 
+#if L'\x1234' != 0x1234
+#error 0xfeed	/* { dg-bogus "error" "wide charconst recognition 2" } */
+#endif
+
 #if 'abcd' /* { dg-warning "multi-character character constant" "multi-character charconst" } */
 #endif
 


More information about the Gcc mailing list