This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Remove __restrict quals from wmemcmp prototype


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]