aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2002-05-03 03:59:22 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2002-05-03 03:59:22 +0000
commit3a02124033f71762150bbda60784f8b11fff0dd5 (patch)
treefa0b7e91f1b0a9d35a71981042dbee881b94c657
parent797a6ac12c5586327d517bf2be7e4827c17fad97 (diff)
downloadgcc-3a02124033f71762150bbda60784f8b11fff0dd5.zip
gcc-3a02124033f71762150bbda60784f8b11fff0dd5.tar.gz
gcc-3a02124033f71762150bbda60784f8b11fff0dd5.tar.bz2
ctype_inline.h: Cast to unsigned char.
* config/os/irix/irix5.2/bits/ctype_inline.h: Cast to unsigned char. From-SVN: r53076
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h17
2 files changed, 12 insertions, 10 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 77af683..98452e0 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+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>
* docs/html/faq/index.html: Update list in #4.1.
diff --git a/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h b/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h
index 400b3a7..8cb3172 100644
--- a/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h
+++ b/libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h
@@ -1,6 +1,6 @@
// 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
// 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)[__c] & __m; }
+ { return (_M_table)[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)[*__low++];
+ *__vec++ = (_M_table)[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)[*__low] & __m))
+ while (__low < __high
+ && !((_M_table)[static_cast<unsigned char>(*__low)] & __m))
++__low;
return __low;
}
@@ -61,12 +62,8 @@
ctype<char>::
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;
return __low;
}
-
-
-
-
-