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/10/07, Tom Tromey <tromey@redhat.com> wrote:
> >>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
>
> Mark> If the compiler treats:
> Mark> int *p = new int;
> Mark> any differently from:
> Mark> int &r = *new int;
> Mark> then we're missing an optimization opportunity.
>
> AFAIK we don't have a way to mark a function as "cannot return NULL".
> This is PR 20318.
If someone reviewed zdenek's function attribute table patch (That
started adding info about arguments, etc and what happens to them), we
could simply extend it to do this in about 10 lines of code
>
> Tom
>