This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Add TOUPPER/TOLOWER to system.h and clean up ctype stuff
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Patch: Add TOUPPER/TOLOWER to system.h and clean up ctype stuff
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 13 Sep 1999 15:00:59 -0700
- Cc: bernds at cygnus dot co dot uk, egcs-patches at egcs dot cygnus dot com, gavin at cygnus dot com
- References: <199909131555.LAA11123@caip.rutgers.edu>
On Mon, Sep 13, 1999 at 11:55:14AM -0400, Kaveh R. Ghazi wrote:
> Because if the parameter is an int you can't distinguish EOF.
> So the cast is only valid if the parameter is a char.
I thought of an ugly way to do this --
#define DOIT(CH) doit(sizeof(CH) == 1 ? (int)(unsigned char)(CH) : (int)(CH))
r~