Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2009-11-06 06:27:19 +0300
committerEric Blake <eblake@redhat.com>2009-11-06 06:27:19 +0300
commit73db6db783606e4d05a3760a7a8344a6eeaca173 (patch)
tree82ed3c74babdb16a6f8855f1b84b480647b2a0cd /newlib/libc/include/ctype.h
parentac4ad8bffcb1358c593b327ae1f1354ec26fee90 (diff)
* libc/include/ctype.h (__ctype_lookup): Fix precedence.
Diffstat (limited to 'newlib/libc/include/ctype.h')
-rw-r--r--newlib/libc/include/ctype.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h
index 75e1c48b3..56ad5abb6 100644
--- a/newlib/libc/include/ctype.h
+++ b/newlib/libc/include/ctype.h
@@ -54,7 +54,7 @@ extern __IMPORT char *__ctype_ptr__;
Meanwhile, the real index to __ctype_ptr__+1 must be cast to int,
since isalpha(0x100000001LL) must equal isalpha(1), rather than being
an out-of-bounds reference on a 64-bit machine. */
-#define __ctype_lookup(__c) ((__ctype_ptr__+sizeof(""[__c]))[(int)__c])
+#define __ctype_lookup(__c) ((__ctype_ptr__+sizeof(""[__c]))[(int)(__c)])
#define isalpha(__c) (__ctype_lookup(__c)&(_U|_L))
#define isupper(__c) ((__ctype_lookup(__c)&(_U|_L))==_U)