This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/18785] New: isdigit builtin function fails with EBCDIC character sets
- From: "darcypj at us dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2004 14:22:20 -0000
- Subject: [Bug middle-end/18785] New: isdigit builtin function fails with EBCDIC character sets
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Configured with: /cteam/darcypj/200410bld/hbtree/configure
--target=s390x-ibm-tpf --prefix=/opt/tpf-cross-tools2
--with-gcc-version-trigger=/cteam/darcypj/200410bld/hbtree/gcc/version.c
--program-prefix=s390x-ibm-tpf-
--with-headers=/cteam/darcypj/200410bld/tpfheaders/include
--build=s390x-ibm-linux --without-newlib --enable-languages=c,c++
--with-libs=/opt/tpf-cross-tools2/lib --with-lib-path=/opt/tpf-cross-tools2/lib
--host=s390x-ibm-linux
Thread model: tpf
gcc version 4.0.0 20041107 (experimental)
Compilation command line:
s390x-ibm-tpf-gcc -c digit.c -fexec-charset=IBM1047 -fverbose-asm -gdwarf-2
-Wa,-aldhs=listing.lst --save-temps -Wall
No compiler warnings or errors emitted.
The isdigit builtin function is using ASCII '0' for the comparison to the
character passed to isdigit. This causes a failure in this case, because the
IBM1047 codepage (and most EBCDIC based codepages) has a wholly different
representation for numeric characters than plain old ASCII.
Note: You don't need to be building for this specific target to get these
results, just use any version from the trunk after isdigit was inserted as a
builtin function, and make sure you use an EBCDIC character set for the
-fexec-charset. I have .i files from s390x-ibm-tpf target and from a native
i686-gnu-linux build.
I will attach a sample .i file shortly from each architecture.
--
Summary: isdigit builtin function fails with EBCDIC character
sets
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: darcypj at us dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: s390x-ibm-linux
GCC host triplet: s390x-ibm-linux
GCC target triplet: s390x-ibm-tpf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18785