OSDN Git Service

* config/os/irix/irix5.2/bits/ctype_inline.h: Cast to unsigned
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 May 2002 03:59:22 +0000 (03:59 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 May 2002 03:59:22 +0000 (03:59 +0000)
char.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53076 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/config/os/irix/irix5.2/bits/ctype_inline.h

index 77af683..98452e0 100644 (file)
@@ -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.
index 400b3a7..8cb3172 100644 (file)
@@ -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
   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;
   }
   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;
   }
-
-
-
-
-