This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new


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.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]