This is the mail archive of the gcc@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: [RFC] Marking C++ new operator as malloc?


On Sep 7, 2007, at 1:53 PM, Martin Jambor wrote:
> [ giving operator new the malloc property ]

On Fri, Sep 07, 2007 at 06:30:33PM -0700, Chris Lattner 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.

The malloc property doesn't mean that operator new is defined in terms
of malloc.  It refers to the aliasing properties of the returned
values; specifically, the compiler can assume that two separate calls
return values that don't alias each other.


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