This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Enum fix to safe-ctype.h for gcc build with native cc on vax ultrix
- To: dave at hiauly1 dot hia dot nrc dot ca
- Subject: Re: Enum fix to safe-ctype.h for gcc build with native cc on vax ultrix
- From: DJ Delorie <dj at redhat dot com>
- Date: Thu, 1 Mar 2001 17:46:12 -0500
- CC: gcc-patches at gcc dot gnu dot org
- References: <200103012039.PAA26801@hiauly1.hia.nrc.ca>
> Please review.
Approved, but what was the problem the old code was causing?
> --
> J. David Anglin dave.anglin@nrc.ca
> National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
>
> 2001-02-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
>
> * safe-ctype.h (_sch_test): Cast enum bit to short int for pcc
> compatibility.
>
> --- safe-ctype.h.orig Sat Dec 16 14:12:06 2000
> +++ safe-ctype.h Sun Feb 18 20:00:54 2001
> @@ -69,7 +69,7 @@
> /* Character classification. */
> extern const unsigned short _sch_istable[256];
>
> -#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (bit))
> +#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
>
> #define ISALPHA(c) _sch_test(c, _sch_isalpha)
> #define ISALNUM(c) _sch_test(c, _sch_isalnum)
>