diff options
author | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2002-08-01 22:17:23 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2002-08-01 22:17:23 +0000 |
commit | 3450b8d03cda7bfc8f1db76506ad574404da8907 (patch) | |
tree | a7cc8dbf0f36ba2857e994dbdb4f183353d875c5 | |
parent | db2350e0208f0d8fe53ebd1a1116bf52cd094132 (diff) | |
download | gcc-3450b8d03cda7bfc8f1db76506ad574404da8907.zip gcc-3450b8d03cda7bfc8f1db76506ad574404da8907.tar.gz gcc-3450b8d03cda7bfc8f1db76506ad574404da8907.tar.bz2 |
re PR libstdc++/7461 (ctype<char>::classic_table() returns offset array on Cygwin)
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.
From-SVN: r55955
-rw-r--r-- | libstdc++-v3/ChangeLog | 11 | ||||
-rw-r--r-- | libstdc++-v3/config/os/newlib/ctype_inline.h | 16 | ||||
-rw-r--r-- | libstdc++-v3/config/os/newlib/ctype_noninline.h | 2 |
3 files changed, 18 insertions, 11 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e63ff89..7ad59c9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +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. + +2002-08-01 Neil Booth <neil@daikokuya.co.uk> + + * libsupc++/Makefile.am (LT_COMPILE): Remove C++ flags. + * libsupc++/Makefile.in: Regenerate. + 2002-08-01 Benjamin Kosnik <bkoz@redhat.com> Jakub Jelinek <jakub@redhat.com> diff --git a/libstdc++-v3/config/os/newlib/ctype_inline.h b/libstdc++-v3/config/os/newlib/ctype_inline.h index cddffed..cd3e9ba 100644 --- a/libstdc++-v3/config/os/newlib/ctype_inline.h +++ b/libstdc++-v3/config/os/newlib/ctype_inline.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000 Free Software Foundation, Inc. +// 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,14 +37,14 @@ bool ctype<char>:: is(mask __m, char __c) const - { return (_M_table + 1)[(unsigned char)(__c)] & __m; } + { 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)[(unsigned char) (*__low++)]; + *__vec++ = (_M_table + 1)[static_cast<unsigned char>(*__low++)]; return __high; } @@ -52,7 +52,8 @@ ctype<char>:: scan_is(mask __m, const char* __low, const char* __high) const { - while (__low < __high && !((_M_table + 1)[(unsigned char)(*__low)] & __m)) + while (__low < __high + && !((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m)) ++__low; return __low; } @@ -62,12 +63,7 @@ scan_not(mask __m, const char* __low, const char* __high) const { while (__low < __high - && ((_M_table + 1)[(unsigned char)(*__low)] & __m) != 0) + && ((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m) != 0) ++__low; return __low; } - - - - - diff --git a/libstdc++-v3/config/os/newlib/ctype_noninline.h b/libstdc++-v3/config/os/newlib/ctype_noninline.h index 7cb1ece..b511c4a 100644 --- a/libstdc++-v3/config/os/newlib/ctype_noninline.h +++ b/libstdc++-v3/config/os/newlib/ctype_noninline.h @@ -35,7 +35,7 @@ const ctype_base::mask* ctype<char>::classic_table() throw() - { return _ctype_; } + { return _ctype_ + 1; } ctype<char>::ctype(__c_locale, const mask* __table, bool __del, size_t __refs) |