------- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-13 02:10 ------- (In reply to comment #5) > Is this safe? People can define their own operator new's, some of which may > return null...
Yes because the normal operator new guarante not to return NULL by the C++ standard. And if it returns a NULL that is undefined behavior, it should be throwing an exception when memory could not be allocated (there is a nonthrow version which can and will return NULL). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476