This is the mail archive of the gcc-patches@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]

Re: Patch: Add TOUPPER/TOLOWER to system.h and clean up ctype stuff


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~


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