This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Remove C++ style comments from string3.h
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 30 Sep 2016 12:17:05 +0200
- Subject: Re: [PATCH] Remove C++ style comments from string3.h
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
* 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?