I am attaching a tentative patch for review, in relation with STDCXX-541
(https://issues.apache.org/jira/browse/STDCXX-541). Testing showed it
solves the test case failure and adds no extra failures in the stdcxx
strings test suite. This solves quite a few of related failures in
strings in downstream products.
ChangeLog:
* rw/_traits.h: added cast to unsigned char
Index: include/rw/_traits.h
===================================================================
--- include/rw/_traits.h (revision 571276)
+++ include/rw/_traits.h (working copy)
@@ -406,8 +406,9 @@
// cast to const void* used to get around a gcc 2.95 bug
// that prevents a static_cast from void* --> const T*
// (only occurs if memchr() isn't overloaded on const)
- return _RWSTD_STATIC_CAST (const char_type*,
- (const void*)_RWSTD_MEMCHR (__s, __c, __n));
+ return _RWSTD_STATIC_CAST (
+ const char_type*, (const void*)_RWSTD_MEMCHR (
+ __s, _RWSTD_STATIC_CAST (unsigned char, __c), __n));
}
static _RWSTD_SIZE_T length (const char_type *__s) {