public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ronald@landheer.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/11170] New: bug in ctype_inline.h header file (undefined __istype will break compilation)
Date: Thu, 12 Jun 2003 09:57:00 -0000	[thread overview]
Message-ID: <20030612095704.11170.ronald@landheer.com> (raw)

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


             reply	other threads:[~2003-06-12  9:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-12  9:57 ronald@landheer.com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030612095704.11170.ronald@landheer.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).