public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11170] New: bug in ctype_inline.h header file (undefined __istype will break compilation)
@ 2003-06-12  9:57 ronald@landheer.com
  2003-06-12 10:17 ` [Bug libstdc++/11170] " giovannibajo@libero.it
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ronald@landheer.com @ 2003-06-12  9:57 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-05-25  5:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-12  9:57 [Bug c++/11170] New: bug in ctype_inline.h header file (undefined __istype will break compilation) ronald@landheer.com
2003-06-12 10:17 ` [Bug libstdc++/11170] " giovannibajo@libero.it
2003-06-12 22:18 ` rittle@latour.rsch.comm.mot.com
2003-06-13  8:33 ` ronald@landheer.com
2003-08-06  3:56 ` pinskia at physics dot uc dot edu
2003-08-06  8:19 ` blytkerchan at users dot sourceforge dot net
2003-08-20 22:11 ` pinskia at gcc dot gnu dot org
2003-08-23  0:26 ` dhazeghi at yahoo dot com
2004-05-26  4:15 ` bkoz at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).