This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: signed vs unsigned pointer warning
- From: prj at po dot cwru dot edu (Paul Jarc)
- To: Joe Buck <Joe dot Buck at synopsys dot COM>
- Cc: Nick Ing-Simmons <nick at ing-simmons dot net>, jamie at shareable dot org, gcc at gcc dot gnu dot org, "'Morten Welinder'" <terra at gnome dot org>, Dave Korn <dk at artimi dot com>
- Date: Fri, 08 Oct 2004 12:26:35 -0400
- Subject: Re: signed vs unsigned pointer warning
- Organization: What did you have in mind? A short, blunt, human pyramid?
- References: <20040922161751.B4F6A1422D53@darter.rentec.com><NUTMEGODkUqESudbgsy00000021@NUTMEG.CAM.ARTIMI.COM><20040926192142.GA29842@mail.shareable.org><20040926192142.GA29842@mail.shareable.org><20041008130623.9516.4@llama.elixent.com><20041008091714.A1695@synopsys.com>
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