This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib and endianness problems
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: cpplib and endianness problems
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 17 Jan 2001 10:52:49 -0200
- Cc: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>, Dave Brolley <brolley at redhat dot com>, gcc at gcc dot gnu dot org, Zack Weinberg <zackw at Stanford dot EDU>, gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20001217144034.D13575@daikokuya.demon.co.uk><3A3E35F7.7060503@redhat.com><20010109234936.B10605@daikokuya.demon.co.uk><20010110154444.F30055@pcep-jamie.cern.ch><20010115074928.A29116@daikokuya.demon.co.uk>
On Jan 15, 2001, Neil Booth <neil@daikokuya.demon.co.uk> wrote:
> Jamie Lokier wrote:-
>> Does it pass with 0x1234? If so, wchar_t is signed and getting
>> sign-extended.
> Yes, it appears OK. So I'll comment out the old test, with this patch.
I think it would be nice to check whether we do The Right Thing (TM)
when wchar_t is signed too. How about this patch? Ok to install?
Index: gcc/testsuite/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* gcc.dg/cpp/if-2.c: Adjust for signed wchar_t.
Index: gcc/testsuite/gcc.dg/cpp/if-2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/gcc.dg/cpp/if-2.c,v
retrieving revision 1.5
diff -u -p -r1.5 if-2.c
--- gcc/testsuite/gcc.dg/cpp/if-2.c 2001/01/15 07:51:18 1.5
+++ gcc/testsuite/gcc.dg/cpp/if-2.c 2001/01/17 12:48:44
@@ -9,10 +9,8 @@
#error L'a' /* { dg-bogus "error" "wide charconst recognition 1" } */
#endif
-#if 0 /* This test doesn't work on targets with signed 16-bit wchar_t. */
-#if L'\xfeed' != 0xfeed
+#if L'\xfeed' != 0xfeed && L'\xfeed' != (0xfeed - 0x10000)
#error 0xfeed /* { dg-bogus "error" "wide charconst recognition 2" } */
-#endif
#endif
#if L'\x1234' != 0x1234
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me