Re: [PATCH] libstdc++: Use __builtin_operator_new when available [PR94295]

2021-07-22 Thread Jonathan Wakely via Gcc-patches
On 20/07/21 20:43 +0100, Jonathan Wakely wrote: Clang provides __builtin_operator_new and __builtin_operator_delete, which have the same semantics as ::operator new and ::operator delete except that the compiler is allowed to elide calls to them. This changes std::allocator to use those built-in

[PATCH] libstdc++: Use __builtin_operator_new when available [PR94295]

2021-07-20 Thread Jonathan Wakely via Gcc-patches
Clang provides __builtin_operator_new and __builtin_operator_delete, which have the same semantics as ::operator new and ::operator delete except that the compiler is allowed to elide calls to them. This changes std::allocator to use those built-in functions so that memory allocated by std::allocat