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


On Fri, Oct 08, 2004 at 02:06:23PM +0100, Nick Ing-Simmons wrote:
> >This is a real typical bug.  Just recently a bug was found in
> >curl-library, quite a popular little library, which calls
> >isspace(char).  The bug was missed for a long time, as it is only
> >triggered with characters with the MSB set, which do not occur often
> >in HTTP headers.
> 
> I am reasnably sure that on old SunOS4 systems passing signed char 
> to isxxx() was normal and worked. The lookup tables where defined
> in such a way that 128 or so entries before the normal table replicated 
> the 2nd half.

Why can't an implementation define isxxx(c) to return something like
    table_lookup[(unsigned)(c)]
?




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