From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13429 invoked by alias); 1 Aug 2002 21:39:19 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 13395 invoked by uid 61); 1 Aug 2002 21:39:19 -0000 Date: Thu, 01 Aug 2002 14:39:00 -0000 Message-ID: <20020801213919.13394.qmail@sources.redhat.com> To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, rdanos@hotmail.com From: bkoz@gcc.gnu.org Reply-To: bkoz@gcc.gnu.org, 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 Subject: Re: libstdc++/7461: ctype::classic_table() returns offset array on Cygwin X-SW-Source: 2002-08/txt/msg00010.txt.bz2 List-Id: Synopsis: ctype::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 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:: is(mask __m, char __c) const ! { return (_M_table + 1)[(unsigned char)(__c)] & __m; } const char* ctype:: 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:: is(mask __m, char __c) const ! { return (_M_table + 1)[static_cast(__c)] & __m; } const char* ctype:: is(const char* __low, const char* __high, mask* __vec) const { while (__low < __high) ! *__vec++ = (_M_table + 1)[static_cast(*__low++)]; return __high; } *************** *** 52,58 **** ctype:: 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:: scan_is(mask __m, const char* __low, const char* __high) const { ! while (__low < __high ! && !((_M_table + 1)[static_cast(*__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(*__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::classic_table() throw() ! { return _ctype_; } ctype::ctype(__c_locale, const mask* __table, bool __del, size_t __refs) --- 35,41 ---- const ctype_base::mask* ctype::classic_table() throw() ! { return _ctype_ + 1; } ctype::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&pr=7461