This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix librayr name of __builtin_allocal_with_align
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Apr 2015 10:47:09 +0200 (CEST)
- Subject: Re: Fix librayr name of __builtin_allocal_with_align
- Authentication-results: sourceware.org; auth=none
- References: <20150427083126 dot GB46857 at kam dot mff dot cuni dot cz>
On Mon, 27 Apr 2015, Jan Hubicka wrote:
> Hi,
> build_common_builtin_nodes declares both __builtin_alloca and
> __builtin_alloca_with_align to have library name "alloca". This actually
> triggers warning in an updated ODR violation detector on "alloca" being
> declared twice.
>
> __builtin_alloca_with_align IMO do not have library equivalent and I think this
> is a pasto (__builtin_alloca_with_align is not documented in extend.texi). It
> is not clear to me if there was some intention behind this oddity though.
>
> I have bootstrapped/regtested x86_64 with the following. OK?
Yes.
Thanks,
Richard.
> Honza
>
> * tree.c (build_common_builtin_nodes): Do not build
> __builtin_alloca_with_align as equivalent of library alloca.
> Index: tree.c
> ===================================================================
> --- tree.c (revision 222391)
> +++ tree.c (working copy)
> @@ -10088,7 +10098,8 @@ build_common_builtin_nodes (void)
> ftype = build_function_type_list (ptr_type_node, size_type_node,
> size_type_node, NULL_TREE);
> local_define_builtin ("__builtin_alloca_with_align", ftype,
> - BUILT_IN_ALLOCA_WITH_ALIGN, "alloca",
> + BUILT_IN_ALLOCA_WITH_ALIGN,
> + "__builtin_alloca_with_align",
> ECF_MALLOC | ECF_NOTHROW | ECF_LEAF);
>
> /* If we're checking the stack, `alloca' can throw. */
>