[PATCH] Remove __restrict quals from wmemcmp prototype

Jakub Jelinek jakub@redhat.com
Thu Mar 10 18:02:00 GMT 2011


Hi!

wmemcmp has restrict quals neither in ISO C99, nor in POSIX, and
const wchar_t p[] = L"abcde";
int r = wmemcmp (p, p + 1, 4); is well defined.  memcmp prototype
is already correct.

2011-03-10  Jakub Jelinek  <jakub@redhat.com>

	* wcsmbs/wchar.h (wmemcmp): Remove __restrict qualifiers.

--- libc/wcsmbs/wchar.h.jj	2010-12-10 20:30:34.000000000 +0100
+++ libc/wcsmbs/wchar.h	2011-03-10 18:33:49.000000000 +0100
@@ -319,8 +319,7 @@ extern wchar_t *wmemchr (__const wchar_t
 #endif
 
 /* Compare N wide characters of S1 and S2.  */
-extern int wmemcmp (__const wchar_t *__restrict __s1,
-		    __const wchar_t *__restrict __s2, size_t __n)
+extern int wmemcmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
      __THROW __attribute_pure__;
 
 /* Copy N wide characters of SRC to DEST.  */

	Jakub



More information about the Libc-alpha mailing list