[libc-commits] [libc] [libc] Replace -nostdlib++ flag when building with gcc and add placement new operator to HermeticTestUtils.cpp. (PR #78906)
via libc-commits
libc-commits at lists.llvm.org
Mon Jan 22 11:22:52 PST 2024
================
@@ -104,6 +104,8 @@ void *__dso_handle = nullptr;
} // extern "C"
+void *operator new(unsigned long size, void *ptr) { return ptr; }
----------------
lntue wrote:
This is variation (9) in the list: https://en.cppreference.com/w/cpp/memory/new/operator_new
and it is said that: "The standard library implementation performs no action and returns `ptr` unmodified."
https://github.com/llvm/llvm-project/pull/78906
More information about the libc-commits
mailing list