User account creation filtered due to spam.

Bug 7461 - ctype<char>::classic_table() returns offset array on Cygwin
Summary: ctype<char>::classic_table() returns offset array on Cygwin
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.1.1
: P3 normal
Target Milestone: ---
Assignee: Benjamin Kosnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-31 17:16 UTC by rdanos
Modified: 2003-07-25 17:33 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
main.ii.bz2 (121.86 KB, application/octet-stream)
2003-05-21 15:17 UTC, rdanos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rdanos 2002-07-31 17:16:00 UTC
For the Cygwin OS, the ctype mask array returned by ctype<char>::classic_table() is offset by 1.  This means that one cannot conveniently look up a character's mask simply referring to the character's integer offset itself,
e.g.,
	const ctype_base::mask* table = ctype<char>::classic_table();
	bool is_space = table[' '] & ctype_base::space;

Instead, you have to manually offset the index by 1 to get the correct character:
	// For Cygwin, the ASCII space is actually stored
	// in offset 33 in the array
	bool is_space = table[' ' + 1] & ctype_base::space;

The C++ standard 22.2.1.3.2 seems to imply that you should be able to do the former.  Even if current libstdc++ behavior is conformant, it is a nuissance and hinders portability.  This issue directly impacts a user when deriving from the ctype<char> class to change the default character mask (for instance, making an underscore appear as whitespace).  Not that this matters, but MSVC performs correctly on the first case.

Release:
gcc 3.1.1

Environment:
i686-pc-cygwin, Windows 2000

How-To-Repeat:
The attached program simply uses a derived class to access the protected ctype<char>::table() function and demonstrate the above behavior.  The is() function works as expected, but the direct table lookup of a space character does not work.

The program will not abort if you replace table[' '] with table[' ' + 1] to account for the offset of classic_table().
Comment 1 rdanos 2002-07-31 17:16:00 UTC
Fix:
The ctype_inline.h and the ctype_noninline.h files used for Cygwin seem to come from libstdc++/config/os/newlib.  The corresponding files for the mingw32 OS address this issue in a different way.  Instead, the array is offset by 1 when it is returned by classic_table().  This has a dual benefit.  First, the stdc++ user is more insulated from OS dependencies; and second, any queries on the mask table (that is, in the scan* functions in ctype_inline.h) no longer need to refer to (_M_table + 1).

As an aside, the ctype_inline.h file in the newlib directory also seems to have been excluded from the cleanup that was performed on the other OS directories (i.e., changing the C-style casts to static_cast).
Comment 2 Benjamin Kosnik 2002-08-01 14:39:18 UTC
Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-Why: Mine.
Comment 3 Benjamin Kosnik 2002-08-01 14:39:18 UTC
State-Changed-From-To: open->feedback
State-Changed-Why: Fixed.
    
    2002-08-01  Rick Danos  <rdanos@hotmail.com>
    
    	PR libstdc++/7461
    	* config/os/newlib/ctype_noninline.h (classic_table): Add offset.
    	* config/os/newlib/ctype_inline.h (is): Use static_cast.
    
    Index: config/os/newlib/ctype_inline.h
    ===================================================================
    RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/newlib/ctype_inline.h,v
    retrieving revision 1.1
    diff -c -p -r1.1 ctype_inline.h
    *** config/os/newlib/ctype_inline.h	24 Jun 2002 05:49:54 -0000	1.1
    --- config/os/newlib/ctype_inline.h	1 Aug 2002 21:38:07 -0000
    ***************
    *** 1,6 ****
      // Locale support -*- C++ -*-
      
    ! // Copyright (C) 2000 Free Software Foundation, Inc.
      //
      // This file is part of the GNU ISO C++ Library.  This library is free
      // software; you can redistribute it and/or modify it under the
    --- 1,6 ----
      // Locale support -*- C++ -*-
      
    ! // Copyright (C) 2000, 2002 Free Software Foundation, Inc.
      //
      // This file is part of the GNU ISO C++ Library.  This library is free
      // software; you can redistribute it and/or modify it under the
    ***************
    *** 37,50 ****
        bool
        ctype<char>::
        is(mask __m, char __c) const
    !   { return (_M_table + 1)[(unsigned char)(__c)] & __m; }
      
        const char*
        ctype<char>::
        is(const char* __low, const char* __high, mask* __vec) const
        {
          while (__low < __high)
    !       *__vec++ = (_M_table + 1)[(unsigned char) (*__low++)];
          return __high;
        }
      
    --- 37,50 ----
        bool
        ctype<char>::
        is(mask __m, char __c) const
    !   { return (_M_table + 1)[static_cast<unsigned char>(__c)] & __m; }
      
        const char*
        ctype<char>::
        is(const char* __low, const char* __high, mask* __vec) const
        {
          while (__low < __high)
    !       *__vec++ = (_M_table + 1)[static_cast<unsigned char>(*__low++)];
          return __high;
        }
      
    ***************
    *** 52,58 ****
        ctype<char>::
        scan_is(mask __m, const char* __low, const char* __high) const 
        {
    !     while (__low < __high && !((_M_table + 1)[(unsigned char)(*__low)] & __m))
            ++__low;
          return __low;
        }
    --- 52,59 ----
        ctype<char>::
        scan_is(mask __m, const char* __low, const char* __high) const 
        {
    !     while (__low < __high 
    ! 	   && !((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m))
            ++__low;
          return __low;
        }
    ***************
    *** 62,73 ****
        scan_not(mask __m, const char* __low, const char* __high) const
        {
          while (__low < __high 
    ! 	   && ((_M_table + 1)[(unsigned char)(*__low)] & __m) != 0)
            ++__low;
          return __low;
        }
    - 
    - 
    - 
    - 
    - 
    --- 63,69 ----
        scan_not(mask __m, const char* __low, const char* __high) const
        {
          while (__low < __high 
    ! 	   && ((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m) != 0)
            ++__low;
          return __low;
        }
    Index: config/os/newlib/ctype_noninline.h
    ===================================================================
    RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/newlib/ctype_noninline.h,v
    retrieving revision 1.1
    diff -c -p -r1.1 ctype_noninline.h
    *** config/os/newlib/ctype_noninline.h	24 Jun 2002 05:49:54 -0000	1.1
    --- config/os/newlib/ctype_noninline.h	1 Aug 2002 21:38:07 -0000
    ***************
    *** 35,41 ****
        
        const ctype_base::mask*
        ctype<char>::classic_table() throw()
    !   { return _ctype_; }
      
        ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
      		     size_t __refs) 
    --- 35,41 ----
        
        const ctype_base::mask*
        ctype<char>::classic_table() throw()
    !   { return _ctype_ + 1; }
      
        ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
      		     size_t __refs)
Comment 4 rdanos 2002-08-01 16:31:43 UTC
From: "Rick Danos" <rdanos@hotmail.com>
To: <bkoz@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<rdanos@hotmail.com>,
	<gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: libstdc++/7461: ctype<char>::classic_table() returns offset array on Cygwin
Date: Thu, 1 Aug 2002 16:31:43 -0600

 Sorry - I believe that now that the offset is being taken into account in
 the return from classic_table(), it is *no longer* necessary to also have
 the offsets in the ctype_inline.h functions that reference the mask array.
 In other words, I don't believe it is necessary to use (_M_table + 1) in the
 ctype_inline.h functions, but you should now just use _M_table.
 
 I appreciate the rapid addressing of this issue, and your and the entire
 team's work on this product is amazing.
 
 -- Rick
 
 ----- Original Message -----
 From: <bkoz@gcc.gnu.org>
 To: <bkoz@gcc.gnu.org>; <gcc-bugs@gcc.gnu.org>; <gcc-prs@gcc.gnu.org>;
 <nobody@gcc.gnu.org>; <rdanos@hotmail.com>
 Sent: Thursday, August 01, 2002 3:39 PM
 Subject: Re: libstdc++/7461: ctype<char>::classic_table() returns offset
 array on Cygwin
 
 
 > Synopsis: ctype<char>::classic_table() returns offset array on Cygwin
 >
 > Responsible-Changed-From-To: unassigned->bkoz
 > Responsible-Changed-By: bkoz
 > Responsible-Changed-When: Thu Aug  1 14:39:18 2002
 > Responsible-Changed-Why:
 >     Mine.
 > State-Changed-From-To: open->feedback
 > State-Changed-By: bkoz
 > State-Changed-When: Thu Aug  1 14:39:18 2002
 > State-Changed-Why:
 >     Fixed.
 >
 >     2002-08-01  Rick Danos  <rdanos@hotmail.com>
 >
 >     PR libstdc++/7461
 >     * config/os/newlib/ctype_noninline.h (classic_table): Add offset.
 >     * config/os/newlib/ctype_inline.h (is): Use static_cast.
 >
 >     Index: config/os/newlib/ctype_inline.h
 >     ===================================================================
 >     RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/newlib/ctype_inline.h,v
 >     retrieving revision 1.1
 >     diff -c -p -r1.1 ctype_inline.h
 >     *** config/os/newlib/ctype_inline.h 24 Jun 2002 05:49:54 -0000 1.1
 >     --- config/os/newlib/ctype_inline.h 1 Aug 2002 21:38:07 -0000
 >     ***************
 >     *** 1,6 ****
 >       // Locale support -*- C++ -*-
 >
 >     ! // Copyright (C) 2000 Free Software Foundation, Inc.
 >       //
 >       // This file is part of the GNU ISO C++ Library.  This library is
 free
 >       // software; you can redistribute it and/or modify it under the
 >     --- 1,6 ----
 >       // Locale support -*- C++ -*-
 >
 >     ! // Copyright (C) 2000, 2002 Free Software Foundation, Inc.
 >       //
 >       // This file is part of the GNU ISO C++ Library.  This library is
 free
 >       // software; you can redistribute it and/or modify it under the
 >     ***************
 >     *** 37,50 ****
 >         bool
 >         ctype<char>::
 >         is(mask __m, char __c) const
 >     !   { return (_M_table + 1)[(unsigned char)(__c)] & __m; }
 >
 >         const char*
 >         ctype<char>::
 >         is(const char* __low, const char* __high, mask* __vec) const
 >         {
 >           while (__low < __high)
 >     !       *__vec++ = (_M_table + 1)[(unsigned char) (*__low++)];
 >           return __high;
 >         }
 >
 >     --- 37,50 ----
 >         bool
 >         ctype<char>::
 >         is(mask __m, char __c) const
 >     !   { return (_M_table + 1)[static_cast<unsigned char>(__c)] & __m; }
 >
 >         const char*
 >         ctype<char>::
 >         is(const char* __low, const char* __high, mask* __vec) const
 >         {
 >           while (__low < __high)
 >     !       *__vec++ = (_M_table + 1)[static_cast<unsigned
 char>(*__low++)];
 >           return __high;
 >         }
 >
 >     ***************
 >     *** 52,58 ****
 >         ctype<char>::
 >         scan_is(mask __m, const char* __low, const char* __high) const
 >         {
 >     !     while (__low < __high && !((_M_table + 1)[(unsigned
 char)(*__low)] & __m))
 >             ++__low;
 >           return __low;
 >         }
 >     --- 52,59 ----
 >         ctype<char>::
 >         scan_is(mask __m, const char* __low, const char* __high) const
 >         {
 >     !     while (__low < __high
 >     !    && !((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m))
 >             ++__low;
 >           return __low;
 >         }
 >     ***************
 >     *** 62,73 ****
 >         scan_not(mask __m, const char* __low, const char* __high) const
 >         {
 >           while (__low < __high
 >     !    && ((_M_table + 1)[(unsigned char)(*__low)] & __m) != 0)
 >             ++__low;
 >           return __low;
 >         }
 >     -
 >     -
 >     -
 >     -
 >     -
 >     --- 63,69 ----
 >         scan_not(mask __m, const char* __low, const char* __high) const
 >         {
 >           while (__low < __high
 >     !    && ((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m) !=
 0)
 >             ++__low;
 >           return __low;
 >         }
 >     Index: config/os/newlib/ctype_noninline.h
 >     ===================================================================
 >     RCS file:
 /cvs/gcc/gcc/libstdc++-v3/config/os/newlib/ctype_noninline.h,v
 >     retrieving revision 1.1
 >     diff -c -p -r1.1 ctype_noninline.h
 >     *** config/os/newlib/ctype_noninline.h 24 Jun 2002 05:49:54 -0000 1.1
 >     --- config/os/newlib/ctype_noninline.h 1 Aug 2002 21:38:07 -0000
 >     ***************
 >     *** 35,41 ****
 >
 >         const ctype_base::mask*
 >         ctype<char>::classic_table() throw()
 >     !   { return _ctype_; }
 >
 >         ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
 >            size_t __refs)
 >     --- 35,41 ----
 >
 >         const ctype_base::mask*
 >         ctype<char>::classic_table() throw()
 >     !   { return _ctype_ + 1; }
 >
 >         ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
 >            size_t __refs)
 >
 >
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 r=7461
 >

Comment 5 Benjamin Kosnik 2002-08-01 22:17:23 UTC
From: bkoz@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libstdc++/7461
Date: 1 Aug 2002 22:17:23 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	bkoz@gcc.gnu.org	2002-08-01 15:17:23
 
 Modified files:
 	libstdc++-v3   : ChangeLog 
 	libstdc++-v3/config/os/newlib: ctype_inline.h ctype_noninline.h 
 
 Log message:
 	2002-08-01  Rick Danos  <rdanos@hotmail.com>
 	
 	PR libstdc++/7461
 	* config/os/newlib/ctype_noninline.h (classic_table): Add offset.
 	* config/os/newlib/ctype_inline.h (is): Use static_cast.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1303&r2=1.1304
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/os/newlib/ctype_inline.h.diff?cvsroot=gcc&r1=1.1&r2=1.2
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/os/newlib/ctype_noninline.h.diff?cvsroot=gcc&r1=1.1&r2=1.2
 

Comment 6 cgf@gcc.gnu.org 2002-08-01 23:41:54 UTC
From: Christopher Faylor <cgf@redhat.com>
To: Rick Danos <rdanos@hotmail.com>
Cc: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/7461: ctype<char>::classic_table() returns offset array on cygwin
Date: Thu, 1 Aug 2002 23:41:54 -0400

 On Thu, Aug 01, 2002 at 04:31:43PM -0600, Rick Danos wrote:
 >Sorry - I believe that now that the offset is being taken into account in
 >the return from classic_table(), it is *no longer* necessary to also have
 >the offsets in the ctype_inline.h functions that reference the mask array.
 >In other words, I don't believe it is necessary to use (_M_table + 1) in the
 >ctype_inline.h functions, but you should now just use _M_table.
 >
 >I appreciate the rapid addressing of this issue, and your and the entire
 >team's work on this product is amazing.
 
 So, should this patch be reverted?  If not, has it been checked into the
 3.2 branch?  I don't see it...
 
 cgf
 
 >----- Original Message -----
 >From: <bkoz@gcc.gnu.org>
 >To: <bkoz@gcc.gnu.org>; <gcc-bugs@gcc.gnu.org>; <gcc-prs@gcc.gnu.org>;
 ><nobody@gcc.gnu.org>; <rdanos@hotmail.com>
 >Sent: Thursday, August 01, 2002 3:39 PM
 >Subject: Re: libstdc++/7461: ctype<char>::classic_table() returns offset
 >array on Cygwin
 >
 >
 >> Synopsis: ctype<char>::classic_table() returns offset array on Cygwin
 >>
 >> Responsible-Changed-From-To: unassigned->bkoz
 >> Responsible-Changed-By: bkoz
 >> Responsible-Changed-When: Thu Aug  1 14:39:18 2002
 >> Responsible-Changed-Why:
 >>     Mine.
 >> State-Changed-From-To: open->feedback
 >> State-Changed-By: bkoz
 >> State-Changed-When: Thu Aug  1 14:39:18 2002
 >> State-Changed-Why:
 >>     Fixed.
 >>
 >>     2002-08-01  Rick Danos  <rdanos@hotmail.com>
 >>
 >>     PR libstdc++/7461
 >>     * config/os/newlib/ctype_noninline.h (classic_table): Add offset.
 >>     * config/os/newlib/ctype_inline.h (is): Use static_cast.
 >>
 >>     Index: config/os/newlib/ctype_inline.h
 >>     ===================================================================
 >>     RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/newlib/ctype_inline.h,v
 >>     retrieving revision 1.1
 >>     diff -c -p -r1.1 ctype_inline.h
 >>     *** config/os/newlib/ctype_inline.h 24 Jun 2002 05:49:54 -0000 1.1
 >>     --- config/os/newlib/ctype_inline.h 1 Aug 2002 21:38:07 -0000
 >>     ***************
 >>     *** 1,6 ****
 >>       // Locale support -*- C++ -*-
 >>
 >>     ! // Copyright (C) 2000 Free Software Foundation, Inc.
 >>       //
 >>       // This file is part of the GNU ISO C++ Library.  This library is
 >free
 >>       // software; you can redistribute it and/or modify it under the
 >>     --- 1,6 ----
 >>       // Locale support -*- C++ -*-
 >>
 >>     ! // Copyright (C) 2000, 2002 Free Software Foundation, Inc.
 >>       //
 >>       // This file is part of the GNU ISO C++ Library.  This library is
 >free
 >>       // software; you can redistribute it and/or modify it under the
 >>     ***************
 >>     *** 37,50 ****
 >>         bool
 >>         ctype<char>::
 >>         is(mask __m, char __c) const
 >>     !   { return (_M_table + 1)[(unsigned char)(__c)] & __m; }
 >>
 >>         const char*
 >>         ctype<char>::
 >>         is(const char* __low, const char* __high, mask* __vec) const
 >>         {
 >>           while (__low < __high)
 >>     !       *__vec++ = (_M_table + 1)[(unsigned char) (*__low++)];
 >>           return __high;
 >>         }
 >>
 >>     --- 37,50 ----
 >>         bool
 >>         ctype<char>::
 >>         is(mask __m, char __c) const
 >>     !   { return (_M_table + 1)[static_cast<unsigned char>(__c)] & __m; }
 >>
 >>         const char*
 >>         ctype<char>::
 >>         is(const char* __low, const char* __high, mask* __vec) const
 >>         {
 >>           while (__low < __high)
 >>     !       *__vec++ = (_M_table + 1)[static_cast<unsigned
 >char>(*__low++)];
 >>           return __high;
 >>         }
 >>
 >>     ***************
 >>     *** 52,58 ****
 >>         ctype<char>::
 >>         scan_is(mask __m, const char* __low, const char* __high) const
 >>         {
 >>     !     while (__low < __high && !((_M_table + 1)[(unsigned
 >char)(*__low)] & __m))
 >>             ++__low;
 >>           return __low;
 >>         }
 >>     --- 52,59 ----
 >>         ctype<char>::
 >>         scan_is(mask __m, const char* __low, const char* __high) const
 >>         {
 >>     !     while (__low < __high
 >>     !    && !((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m))
 >>             ++__low;
 >>           return __low;
 >>         }
 >>     ***************
 >>     *** 62,73 ****
 >>         scan_not(mask __m, const char* __low, const char* __high) const
 >>         {
 >>           while (__low < __high
 >>     !    && ((_M_table + 1)[(unsigned char)(*__low)] & __m) != 0)
 >>             ++__low;
 >>           return __low;
 >>         }
 >>     -
 >>     -
 >>     -
 >>     -
 >>     -
 >>     --- 63,69 ----
 >>         scan_not(mask __m, const char* __low, const char* __high) const
 >>         {
 >>           while (__low < __high
 >>     !    && ((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m) !=
 >0)
 >>             ++__low;
 >>           return __low;
 >>         }
 >>     Index: config/os/newlib/ctype_noninline.h
 >>     ===================================================================
 >>     RCS file:
 >/cvs/gcc/gcc/libstdc++-v3/config/os/newlib/ctype_noninline.h,v
 >>     retrieving revision 1.1
 >>     diff -c -p -r1.1 ctype_noninline.h
 >>     *** config/os/newlib/ctype_noninline.h 24 Jun 2002 05:49:54 -0000 1.1
 >>     --- config/os/newlib/ctype_noninline.h 1 Aug 2002 21:38:07 -0000
 >>     ***************
 >>     *** 35,41 ****
 >>
 >>         const ctype_base::mask*
 >>         ctype<char>::classic_table() throw()
 >>     !   { return _ctype_; }
 >>
 >>         ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
 >>            size_t __refs)
 >>     --- 35,41 ----
 >>
 >>         const ctype_base::mask*
 >>         ctype<char>::classic_table() throw()
 >>     !   { return _ctype_ + 1; }
 >>
 >>         ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
 >>            size_t __refs)
 >>
 >>
 >http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 >r=7461
 >>
Comment 7 Benjamin Kosnik 2002-08-03 13:15:26 UTC
State-Changed-From-To: feedback->closed
State-Changed-Why: I believe this is fixed: please correct me if I'm wrong.
Comment 8 Danny Smith 2002-08-08 03:09:13 UTC
From: dannysmith@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libstdc++/7461
Date: 8 Aug 2002 03:09:13 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	cygwin-mingw-gcc-3_2-branch
 Changes by:	dannysmith@gcc.gnu.org	2002-08-07 20:09:13
 
 Modified files:
 	libstdc++-v3/config/os/newlib/bits: ctype_inline.h 
 	                                    ctype_noninline.h 
 	libstdc++-v3   : ChangeLog.cygwin-mingw 
 
 Log message:
 	Merge newlib ctype fixes from trunk.
 	
 	2002-08-02 Danny Smith  <dannysmith@users.sourceforge.net>
 	* config/os/newlib/bit/ctype_inline.h (is): Don't offset
 	_M_table.
 	(scan_is): Use this->is.
 	(scan_not): Likewise.
 	
 	2002-08-01  Rick Danos  <rdanos@hotmail.com>
 	PR libstdc++/7461
 	* config/os/newlib/bits/ctype_noninline.h (classic_table): Add
 	offset.
 	* config/os/newlib/bits/ctype_inline.h (is): Use static_cast..
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/os/newlib/bits/ctype_inline.h.diff?cvsroot=gcc&only_with_tag=cygwin-mingw-gcc-3_2-branch&r1=1.4&r2=1.4.34.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/os/newlib/bits/ctype_noninline.h.diff?cvsroot=gcc&only_with_tag=cygwin-mingw-gcc-3_2-branch&r1=1.8.2.1&r2=1.8.2.1.6.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.cygwin-mingw.diff?cvsroot=gcc&only_with_tag=cygwin-mingw-gcc-3_2-branch&r1=1.1.2.3.2.1&r2=1.1.2.3.2.2
 

Comment 9 Benjamin Kosnik 2002-08-15 22:25:11 UTC
From: bkoz@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libstdc++/7461
Date: 15 Aug 2002 22:25:11 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	bkoz@gcc.gnu.org	2002-08-15 15:25:11
 
 Modified files:
 	libstdc++-v3   : ChangeLog 
 	libstdc++-v3/config/os/newlib/bits: ctype_inline.h 
 	                                    ctype_noninline.h 
 	libstdc++-v3/include/bits: istream.tcc 
 	libstdc++-v3/testsuite/27_io: narrow_stream_objects.cc 
 
 Log message:
 	2002-08-15  Danny Smith  <dannysmith@users.sourceforge.net>
 	Benjamin Kosnik  <bkoz@redhat.com>
 	
 	* include/bits/istream.tcc (basic_istream::ignore): Use sbumpc,
 	not snextc.
 	* testsuite/27_io/narrow_stream_objects.cc (test10): Add.
 	
 	2002-08-15  Danny Smith  <dannysmith@users.sourceforge.net>
 	
 	* config/os/newlib/ctype_inline.h (is): Don't offset _M_table.
 	(scan_is): Use this->is.
 	(scan_not): Likewise.
 	
 	2002-08-15  Rick Danos  <rdanos@hotmail.com>
 	
 	PR libstdc++/7461
 	* config/os/newlib/ctype_noninline.h (classic_table): Add offset.
 	* config/os/newlib/ctype_inline.h (is): Use static_cast.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1057.2.159.2.4&r2=1.1057.2.159.2.5
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/os/newlib/bits/ctype_inline.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.4&r2=1.4.32.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/os/newlib/bits/ctype_noninline.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.8.2.1&r2=1.8.2.1.4.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/istream.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.24.2.6.2.2&r2=1.24.2.6.2.3
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/narrow_stream_objects.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.6.14.4&r2=1.6.14.4.4.1