locale_facets.h (ctype<char>): Remove throw specs not in base class signature.
authorBenjamin Kosnik <bkoz@redhat.com>
Thu, 14 Dec 2000 09:19:56 +0000 (09:19 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 14 Dec 2000 09:19:56 +0000 (09:19 +0000)
2000-12-13  Benjamin Kosnik  <bkoz@redhat.com>

* include/bits/locale_facets.h (ctype<char>): Remove throw specs not in
base class signature.
* config/os/*/bits/ctype_inline.h (is): Same.

From-SVN: r38250

13 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/os/aix/bits/ctype_inline.h
libstdc++-v3/config/os/bsd/freebsd/bits/ctype_inline.h
libstdc++-v3/config/os/bsd/netbsd/bits/ctype_inline.h
libstdc++-v3/config/os/generic/bits/ctype_inline.h
libstdc++-v3/config/os/gnu-linux/bits/ctype_inline.h
libstdc++-v3/config/os/hpux/bits/ctype_base.h
libstdc++-v3/config/os/hpux/bits/ctype_inline.h
libstdc++-v3/config/os/irix/bits/ctype_inline.h
libstdc++-v3/config/os/newlib/bits/ctype_inline.h
libstdc++-v3/config/os/solaris/solaris2.5/bits/ctype_inline.h
libstdc++-v3/config/os/solaris/solaris2.6/bits/ctype_inline.h
libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_inline.h

index 2f08f4f9897905b3fccf66ecf36b6912dc4b59c5..46340e3d8f9aa3fa4ca565134c3f414fce4d2061 100644 (file)
@@ -2,7 +2,8 @@
 
        * include/bits/locale_facets.h (ctype<char>): Remove throw specs not in
        base class signature.
-
+       * config/os/*/bits/ctype_inline.h (is): Same.
+       
 2000-12-13  Benjamin Kosnik  <bkoz@redhat.com>
 
        * config/os/generic/bits/ctype_base.h (ctype_base): Consistency
index c376f35672308f834d6c1307537c4c16702def9b..16e011c4a9acffbbfd9f724ec9735f92446b4187 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const 
   { return __OBJ_DATA(__lc_ctype)->mask[__c] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const 
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -57,7 +57,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const 
   {
     while (__low < __high && !this->is(__m, *__low))
       ++__low;
@@ -66,7 +66,7 @@
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const 
   {
     while (__low < __high && this->is(__m, *__low) != 0)
       ++__low;
index 64566c27bf1b67eff13da1b0e9d2e62e1335c2c6..b51867dcac259aee59282142a78ba7429d32939b 100644 (file)
@@ -36,7 +36,7 @@
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { 
     if (__m & (digit | xdigit))
       return __isctype(__c, __m);
@@ -46,7 +46,7 @@
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -62,7 +62,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !this->is(__m, *__low))
       ++__low;
@@ -71,7 +71,7 @@
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && this->is(__m, *__low) != 0)
       ++__low;
index 23a6d19bbb2600d182f06f7c7ac3bbf0190406b6..2d72d9896cfe507a3d89d2b3b67dbc13e03cec7e 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { return _M_table[(unsigned char)(__c)] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -57,7 +57,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !this->is(__m, *__low))
       ++__low;
@@ -66,7 +66,7 @@
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && this->is(__m, *__low) != 0)
       ++__low;
@@ -77,3 +77,4 @@
 
 
 
+
index 74429a2a05943e36fe8da470ef00fe22da0e24f7..98c7e3d03093820832bf78c4cce77b3f0dd255ef 100644 (file)
@@ -41,7 +41,7 @@
 
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { 
     bool __ret;
     switch (__m)
@@ -88,7 +88,7 @@
    
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10
     for (;__low < __high; ++__vec, ++__low)
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !this->is(__m, *__low))
       ++__low;
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && this->is(__m, *__low) != 0)
       ++__low;
index 9fe7b16f7b6236792cbdc68829ee054e10cdaa49..83563a9ade766d7284740f09b8b9060d1a074dc6 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { return _M_table[__c] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -57,7 +57,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !(_M_table[*__low] & __m))
       ++__low;
@@ -66,7 +66,7 @@
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high 
           && (_M_table[*__low] & __m) != 0)
index 8b5e0a07252e391e0987f96f4d541bb6ea699699..d11e1e51851df488301dbad012c4ce57e089dcdf 100644 (file)
@@ -1,6 +1,6 @@
 // Locale support -*- C++ -*-
 
-// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+// Copyright (C) 1997-1999, 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
   
   struct ctype_base
   {
-    typedef unsigned int       mask;
     // Non-standard typedefs.
     typedef const int*                 __to_type;
 
-    enum
-    {
-      space = (1 << 5),        // Whitespace
-      print = (1 << 6),        // Printing
-      cntrl = (1 << 9),        // Control character
-      upper = (1 << 0),        // UPPERCASE
-      lower = (1 << 1),        // lowercase
-      alpha = (1 << 5),        // Alphabetic
-      digit = (1 << 2),        // Numeric
-      punct = (1 << 10),// Punctuation
-      xdigit = (1 << 4),// Hexadecimal numeric
-      alnum = (1 << 11),// Alphanumeric
-      graph = (1 << 7) // Graphical
-    };
+    // NB: Offsets into ctype<char>::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned int        mask;   
+    static const mask upper     = 1 << 0;
+    static const mask lower     = 1 << 1;
+    static const mask alpha     = 1 << 2;
+    static const mask digit     = 1 << 3;
+    static const mask xdigit    = 1 << 4;
+    static const mask space     = 1 << 5;
+    static const mask print     = 1 << 6;
+    static const mask graph     = 1 << 7;
+    static const mask cntrl     = 1 << 8;
+    static const mask punct     = 1 << 9;
+    static const mask alnum     = 1 << 10;
   };
-
-
-
index 952b0da8c9808c7fb5e2297070ee5be2744ed436..35cc3063d4c3a0fe2a9588f772cbe8e8096c144b 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const 
   { return _M_table[(unsigned char)(__c)] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const 
   {
-    while (__low < __high)
-      *__vec++ = _M_table[(unsigned char)(*__low++)];
+    const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10
+    for (;__low < __high; ++__vec, ++__low)
+      {
+        mask __m = _M_table[*__low];
+        int __i = 0; // Lowest bitmask in ctype_base == 0
+        while (__i < __bitmasksize && !(__m & static_cast<mask>(1 << __i)))
+          ++__i;
+        *__vec = static_cast<mask>(1 << __i);
+      }
     return __high;
   }
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !this->is(__m, *__low))
       ++__low;
@@ -59,7 +66,7 @@
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && this->is(__m, *__low) != 0)
       ++__low;
index 4a76dc5c6bd51b9e300bcc3d0eac1997a1a51340..1b400f2418338869d6e70dd104167db8b32b474f 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { return (_M_table)[__c] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -57,7 +57,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !((_M_table)[*__low] & __m))
       ++__low;
@@ -66,7 +66,7 @@
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && ((_M_table + 1)[*__low] & __m) != 0)
       ++__low;
index b2dd42b285474acf5f1fbc6ffd614d0e6508f39f..61c4bc85898034dae407686383903d98729d27b0 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { return (_M_table + 1)[(unsigned char)(__c)] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -57,7 +57,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const 
   {
     while (__low < __high && !((_M_table + 1)[(unsigned char)(*__low)] & __m))
       ++__low;
@@ -66,7 +66,7 @@
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high 
           && ((_M_table + 1)[(unsigned char)(*__low)] & __m) != 0)
index d6259a44eaca241c0a95745e16f9ae064081adac..f6719935af076dfc403d289a31ae830eb5213153 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { return (_M_table + 1)[(unsigned char)(__c)] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -57,7 +57,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !((_M_table + 1)[(unsigned char)(*__low)] & __m))
       ++__low;
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  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;
   }
-
-
-
-
-
index 2ea6f69b97f10aab939c50488f4c962da72f0baf..f254e839fb86ad25e314a039d297971952d973db 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { return _M_table[__c] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -57,7 +57,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !(_M_table[*__low] & __m))
       ++__low;
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high 
           && (_M_table[*__low] & __m) != 0)
       ++__low;
     return __low;
   }
-
-
-
-
-
index 2ea6f69b97f10aab939c50488f4c962da72f0baf..f254e839fb86ad25e314a039d297971952d973db 100644 (file)
   
   bool
   ctype<char>::
-  is(mask __m, char __c) const throw()
+  is(mask __m, char __c) const
   { return _M_table[__c] & __m; }
 
   const char*
   ctype<char>::
-  is(const char* __low, const char* __high, mask* __vec) const throw()
+  is(const char* __low, const char* __high, mask* __vec) const
   {
     const int __bitmasksize = sizeof(mask) * 8;
     for (;__low < __high; ++__vec, ++__low)
@@ -57,7 +57,7 @@
 
   const char*
   ctype<char>::
-  scan_is(mask __m, const char* __low, const char* __high) const throw()
+  scan_is(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high && !(_M_table[*__low] & __m))
       ++__low;
 
   const char*
   ctype<char>::
-  scan_not(mask __m, const char* __low, const char* __high) const throw()
+  scan_not(mask __m, const char* __low, const char* __high) const
   {
     while (__low < __high 
           && (_M_table[*__low] & __m) != 0)
       ++__low;
     return __low;
   }
-
-
-
-
-