This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Marking C++ new operator as malloc?
On 9/7/07, Chris Lattner <clattner@apple.com> wrote:
> It is unclear whether this is safe. Nothing in the standard AFAIK
> requires the operator new be implemented in terms of malloc, and
> users are allowed to override it.
I was looking for something else in the standard and found this (5.3.4/7):
[Note: If the library allocation function is called, the pointer
returned is distinct from the pointer to any other object. ]
Which means it has to act like malloc.
-- Pinski