Commit 3a021240 by Kaveh R. Ghazi Committed by Kaveh Ghazi

ctype_inline.h: Cast to unsigned char.

	* config/os/irix/irix5.2/bits/ctype_inline.h: Cast to unsigned
	char.

From-SVN: r53076
parent 797a6ac1
2002-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/os/irix/irix5.2/bits/ctype_inline.h: Cast to unsigned
char.
2002-05-02 Phil Edwards <pme@gcc.gnu.org> 2002-05-02 Phil Edwards <pme@gcc.gnu.org>
* docs/html/faq/index.html: Update list in #4.1. * docs/html/faq/index.html: Update list in #4.1.
......
// Locale support -*- C++ -*- // Locale support -*- C++ -*-
// Copyright (C) 2001 Free Software Foundation, Inc. // Copyright (C) 2001, 2002 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -37,14 +37,14 @@ ...@@ -37,14 +37,14 @@
bool bool
ctype<char>:: ctype<char>::
is(mask __m, char __c) const is(mask __m, char __c) const
{ return (_M_table)[__c] & __m; } { return (_M_table)[static_cast<unsigned char>(__c)] & __m; }
const char* const char*
ctype<char>:: ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const is(const char* __low, const char* __high, mask* __vec) const
{ {
while (__low < __high) while (__low < __high)
*__vec++ = (_M_table)[*__low++]; *__vec++ = (_M_table)[static_cast<unsigned char>(*__low++)];
return __high; return __high;
} }
...@@ -52,7 +52,8 @@ ...@@ -52,7 +52,8 @@
ctype<char>:: ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const scan_is(mask __m, const char* __low, const char* __high) const
{ {
while (__low < __high && !((_M_table)[*__low] & __m)) while (__low < __high
&& !((_M_table)[static_cast<unsigned char>(*__low)] & __m))
++__low; ++__low;
return __low; return __low;
} }
...@@ -61,12 +62,8 @@ ...@@ -61,12 +62,8 @@
ctype<char>:: ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const scan_not(mask __m, const char* __low, const char* __high) const
{ {
while (__low < __high && ((_M_table + 1)[*__low] & __m) != 0) while (__low < __high
&& ((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m) != 0)
++__low; ++__low;
return __low; return __low;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment