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: dj at redhat dot com (DJ Delorie)
- Subject: Re: Enum fix to safe-ctype.h for gcc build with native cc on vax ultrix
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 1 Mar 2001 18:01:05 -0500 (EST)
- Cc: gcc-patches at gcc dot gnu dot org
> > Please review.
>
> Approved, but what was the problem the old code was causing?
> > -#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (bit))
> > +#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
An `&' operation with an enum is an illegal operation with the native
cc compiler on vax ultrix. The compiler generates an error message
and fails to compile any file that uses the above (eg., ISALPHA).
As far as I can tell, the only operators that are acceptable for enums
with the vax pcc compiler are `=', `==' and `!=' and even an implicit
cast of an enum in an assignment causes a warning. Yucky, I know.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)