This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: signed vs unsigned pointer warning


Joe Buck <Joe.Buck@synopsys.COM> wrote:
> Why can't an implementation define isxxx(c) to return something like
>     table_lookup[(unsigned)(c)]
> ?

Assuming EOF==-1, that fails to distinguish between EOF and character
255 (as does the 384-element table in the case where a signed char is
passed).  The ctype macros are supposed to accept EOF as well as
unsigned char values.


paul


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