Richard Guenther wrote:

> I don't know of any place we would use such information.  At least
> 
>   int *p = new int;
>   int *q = new int;
>   if (p == q)
> 
> cannot be simplified as both pointers may be NULL?

They cannot be NULL; new-expressions throw an exception if the
allocation fails.  (Of course, they could be NULL if you called the
"nothrow" variant, or another "operator new" declared "throw()".)

We should optimize away things like:

  int *p = new int;
  if (!p)
    cerr << "Could not allocate memory\n";

-- 
Mark Mitchell
CodeSourcery
[EMAIL PROTECTED]
(650) 331-3385 x713

Reply via email to