This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new
- From: Jason Merrill <jason at redhat dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 29 Nov 2017 16:03:09 -0500
- Subject: Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new
- Authentication-results: sourceware.org; auth=none
- References: <CADzB+2kJRV14hZX1rGz5V_UCpSB7MdVQPh4OM=vYOsw6ZDUNkA@mail.gmail.com> <alpine.DEB.2.21.1711241424080.6330@stedding.saclay.inria.fr>
On Fri, Nov 24, 2017 at 8:31 AM, Marc Glisse <marc.glisse@inria.fr> wrote:
> Hello,
>
> @@ -4247,9 +4248,20 @@ build_operator_new_call (tree fnname, vec<tree,
> va_gc> **args,
> we disregard block-scope declarations of "operator new". */
> fns = lookup_function_nonclass (fnname, *args, /*block_p=*/false);
>
> + if (align_arg)
> + {
> + vec<tree, va_gc>* align_args
> + = vec_copy_and_insert (*args, align_arg, 1);
> + cand = perform_overload_resolution (fns, align_args, &candidates,
> + &any_viable_p, tf_none);
> + /* If no aligned allocation function matches, try again without the
> + alignment. */
> + }
> +
>
> Code further in the function expects to be able to adjust args, which is
> defeated by copying them in align_args, see PR 82760.
Fixed, thanks.