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: Wed, 15 Sep 1999 17:20:06 -0700
- Cc: gavin at cygnus dot com, bernds at cygnus dot co dot uk, egcs-patches at egcs dot cygnus dot com
- References: <199909160011.UAA17677@caip.rutgers.edu>
On Wed, Sep 15, 1999 at 08:11:31PM -0400, Kaveh R. Ghazi wrote:
> Here is my patch rewrite which incorporates your suggestion. I
> verified it does in fact eliminate the "subscript has type char"
> warnings.
Ok.
> + WARNING! The argument to CTYPE_CONV, and thus all ctype macros below,
> + must not have side effects!
Actually, CTYPE_CONV is quite safe from side effects -- there is
one evaluation on each potential code path. Not that we should
rely on side effects in ctype macros...
> + printf ("%c", TOUPPER(*str));
This is putchar.
r~