This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib and endianness problems
- To: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Subject: Re: cpplib and endianness problems
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Thu, 11 Jan 2001 07:54:34 +0000
- Cc: Dave Brolley <brolley at redhat dot com>, gcc at gcc dot gnu dot org,Zack Weinberg <zackw at Stanford dot EDU>
- References: <20001217144034.D13575@daikokuya.demon.co.uk> <3A3E35F7.7060503@redhat.com> <20010109234936.B10605@daikokuya.demon.co.uk> <20010110154444.F30055@pcep-jamie.cern.ch>
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