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?


"Richard Guenther" <richard.guenther@gmail.com> writes:


[...]

| 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?

The above does not use the no-throw operator new, so neither can be
null -- except if the user used command-line -fno-exceptions.

-- Gaby


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