This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11435] <ctype.h> inhibits -Wchar-subscript warning on invalid use of character classification macros
- From: "bart dot vanassche at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 26 Mar 2010 15:20:36 -0000
- Subject: [Bug libc/11435] <ctype.h> inhibits -Wchar-subscript warning on invalid use of character classification macros
- References: <20100326114608.11435.bart.vanassche@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From bart dot vanassche at gmail dot com 2010-03-26 15:20 -------
(In reply to comment #2)
> There is no problem. The arrays extend from indices -128 to 255.
That's a clever trick :-) However, for people writing portable code it would be
convenient to have a way to ensure that the argument passed to e.g. isalpha() is
in the range specified by ANSI/ISO C, namely -1 .. 255 (see e.g.
http://www.opengroup.org/onlinepubs/000095399/functions/isalnum.html). I would
appreciate it if would be possible to enable conditionally a check whether
arguments of type char are passed to isalpha() etc.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11435
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.