[Bug c++/11170] New: bug in ctype_inline.h header file (undefined __istype will break compilation)
ronald@landheer.com
gcc-bugzilla@gcc.gnu.org
Thu Jun 12 09:57:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11170
Summary: bug in ctype_inline.h header file (undefined __istype
will break compilation)
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ronald@landheer.com
CC: gcc-bugs@gcc.gnu.org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i386-unknown-freebsd4.7
When building from source (after having built the binutils, a bootstrap compiler
and a freshly ported Newlib) I configured with
$ ../src/configure --prefix=/home/cross/tmp --target=i386-unknown-freebsd4.7
--with-newlib --disable-threads --disable-shared --enable-languages=c,c++,java
$ make all install
Make produced a number of errors due to missing header files, but when examining
the ctype_inline.h header file from
i386-unknown-freebsd4.7/libstdc++-v3/include/i386-unknown-freebsd4.7/bits/ctype_inline.h,
in the build directory (which is a symlink to
libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h in the source directory) I
found a rather odd bug:
42 return _M_table[static_cast<unsigned char>(__c)] & __m;
43 else
44 return __istype(__c, __m);
45 }
46
Here, __istype is used, while it might not be defined and a couple of lines later:
56 {
57 #if defined (_CTYPE_S) || defined (__istype)
58 *__vec = __maskrune (*__low, upper | lower | alpha | digit |
xdigit
59 | space | print | graph | cntrl | punct
| alnum);
60 #else
61 mask __m = 0;
Line 57 check whether __istype is defined or not, and in case it isn't, and
alternative piece of code is used, but not defining __istype will still break
the header file.
HTH
rlc
More information about the Gcc-bugs
mailing list