On Sat, Jan 14, 2012 at 2:47 PM, Aaron Ballman <[email protected]> wrote: > While chasing butterflies recently, I noticed the code generated by > clang didn't match what was created by MSVC and ICC (but does match > what gcc was emitting). Here's a simplified C++ example: > > void *operator new( unsigned int size ); // note, non-throwing
Per [basic.stc.dynamic.allocation]p3, an operator new which isn't marked throw() or noexcept is required to either succeed or throw an exception matching std::bad_alloc. clang takes advantage of this by skipping the null check. Do you have some specific concern about code which doesn't follow the standard? -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
