summaryrefslogtreecommitdiff
path: root/gcc/genattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/genattr.c')
-rw-r--r--gcc/genattr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/genattr.c b/gcc/genattr.c
index 60dc73aefc2..f9501eda39e 100644
--- a/gcc/genattr.c
+++ b/gcc/genattr.c
@@ -87,8 +87,8 @@ write_upcase (str)
char *str;
{
for (; *str; str++)
- if (*str >= 'a' && *str <= 'z')
- printf ("%c", *str - 'a' + 'A');
+ if (ISLOWER(*str))
+ printf ("%c", toupper(*str));
else
printf ("%c", *str);
}
@@ -120,8 +120,8 @@ gen_attr (attr)
write_upcase (XSTR (attr, 0));
printf ("_");
}
- else if (*p >= 'a' && *p <= 'z')
- printf ("%c", *p - 'a' + 'A');
+ else if (ISLOWER(*p))
+ printf ("%c", toupper(*p));
else
printf ("%c", *p);
}