Message ID | 1475183568-13773-1-git-send-email-adhemerval.zanella@linaro.com |
---|---|
State | New |
Headers | show |
On 30/09/2016 03:17, Florian Weimer wrote: > * Adhemerval Zanella: > >> -// XXX We have no corresponding builtin yet. >> +/* XXX We have no corresponding builtin yet. */ >> extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n, >> size_t __destlen) __THROW; >> extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src, > > I think the comment is outdated, because such a builtin exists now: > > /tmp/t.c:3:22: note: expected ‘char *’ but argument is of type ‘int’ > /tmp/t.c:3:25: warning: passing argument 2 of ‘__builtin_stpncpy’ makes pointer from integer without a cast > __builtin_stpncpy (1, 2, 3); > ^ > This is with gcc version 4.9.2 (Debian 4.9.2-10). > > Perhaps remove it and file a bug to clean this up? > Good catch, bug report created [1]. I will work on it. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=20661
diff --git a/string/bits/string3.h b/string/bits/string3.h index dd8db68..8f13b65 100644 --- a/string/bits/string3.h +++ b/string/bits/string3.h @@ -126,7 +126,7 @@ __NTH (strncpy (char *__restrict __dest, const char *__restrict __src, return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); } -// XXX We have no corresponding builtin yet. +/* XXX We have no corresponding builtin yet. */ extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n, size_t __destlen) __THROW; extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,