Mail Archives: djgpp-workers/1998/02/10/06:24:03
On Tue, 10 Feb 1998, Vik Heyndrickx wrote:
> #define isupper(c) ({int t=(c);unsigned v;\
> ++t;\
> if(t<0)t+=256;\
> v=__dj_ctype_flags[t];\
> (v&__dj_ISUPPER)!=0;})
I think it is better to have the temporary variables' names begin with an
underscore. Otherwise, if the program which uses this macro defines a
variable named `t', gcc will print warning about inner variable which
shadows the outer one (given the right -Wxxx switches). Variables that
begin with underscores are less frequent and ANSI reserves them anyway.
Note that I didn't try to compile this, so I might be wrong.
- Raw text -