libstdc++ adjustment when wctype_t is an enumerated type

Jan Beulich JBeulich@novell.com
Tue Aug 10 16:47:00 GMT 2004


libstdc++' ctype_members.cc wouldn't compile when wctype_t is an
enumerated
type.

Built and tested on i686-pc-linux-gnu.

Jan

2004-08-10 Jan Beulich <jbeulich@novell.com>

	* config/locale/generic/ctype_members.cc
	(ctype<wchar_t>::_M_convert_to_wmask): Default case must no use
0 as
	initializer for return value, as that is invalid for enumerated
types.
	* config/locale/gnu/ctype_members.cc
	(ctype<wchar_t>::_M_convert_to_wmask): Dito.

---
/home/jbeulich/src/gcc/mainline/2004-08-09.09.08/libstdc++-v3/config/locale/generic/ctype_members.cc	2004-04-07
05:33:33.000000000 +0200
+++
2004-08-09.09.08/libstdc++-v3/config/locale/generic/ctype_members.cc	2004-08-10
09:04:18.000000000 +0200
@@ -91,7 +91,7 @@ namespace std
 	__ret = wctype("graph");
 	break;
       default:
-	__ret = 0;
+	__ret = __wmask_type();
       }
     return __ret;
   };
---
/home/jbeulich/src/gcc/mainline/2004-08-09.09.08/libstdc++-v3/config/locale/gnu/ctype_members.cc	2004-05-13
18:29:36.000000000 +0200
+++
2004-08-09.09.08/libstdc++-v3/config/locale/gnu/ctype_members.cc	2004-08-10
09:04:18.000000000 +0200
@@ -95,7 +95,7 @@ namespace std
 	__ret = __wctype_l("graph", _M_c_locale_ctype);
 	break;
       default:
-	__ret = 0;
+	__ret = __wmask_type();
       }
     return __ret;
   }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libstdc++-mainline-wctype.patch
Type: application/octet-stream
Size: 1271 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040810/3cc27a09/attachment.obj>


More information about the Libstdc++ mailing list