Re: Patch for isdigit/isalpha/etc. macro arguments

Eli Zaretskii
2007-04-07T09:16:42Z

> From: Andreas Schwab <schwab@suse.de>
> Cc: sje@cup.hp.com, gdb-patches@sourceware.org
> Date: Sat, 07 Apr 2007 08:18:19 +0200
>
> > char *s = "...";
> > isalpha(*s);
> >
> > is perfectly reasonable code and should not result in compiler
> > warnings.
>
> This will crash and burn if *s < 0. You really need to cast to unsigned
> char if you want to get defined behaviour.

Isn't that the job of the isalpha implementation?