This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Remove __restrict quals from wmemcmp prototype
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ulrich Drepper <drepper at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 10 Mar 2011 19:00:52 +0100
- Subject: [PATCH] Remove __restrict quals from wmemcmp prototype
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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