This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Enum fix to safe-ctype.h for gcc build with native cc on vax ultrix


> > 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]