This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] system.h: Poison strndup (PR bootstrap/78616)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Jan 2017 09:39:56 +0100
- Subject: Re: [PATCH] system.h: Poison strndup (PR bootstrap/78616)
- Authentication-results: sourceware.org; auth=none
- References: <1484342253-27870-1-git-send-email-dmalcolm@redhat.com>
On Fri, Jan 13, 2017 at 10:17 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> This patch poisons strndup (in system.h), as requested in the
> discussion of PR bootstrap/78616.
>
> Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
>
> OK for trunk?
Ok.
Richard.
> gcc/ChangeLog:
> PR bootstrap/78616
> * system.h: Poison strndup.
> ---
> gcc/system.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/system.h b/gcc/system.h
> index 0cd58db..c0f08a9 100644
> --- a/gcc/system.h
> +++ b/gcc/system.h
> @@ -840,7 +840,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
> #ifndef USES_ISL
> #undef calloc
> #undef strdup
> - #pragma GCC poison calloc strdup
> +#undef strndup
> + #pragma GCC poison calloc strdup strndup
> #endif
>
> #if !defined(FLEX_SCANNER) && !defined(YYBISON)
> --
> 1.8.5.3
>