[PATCH] Add configure flag for operator new (std::nothrow)

Martin Sebor msebor@gmail.com
Tue Nov 3 21:10:00 GMT 2015


>> Besides violating the requirement of the C++ standard, replacing
>
> Could you please point us to the relevant section where this behavior
> is enforced? We couldn't find it so far.

The Required behavior of the nothrow operator new reads:

   This nothrow version of operator new returns a pointer obtained
   as if acquired from the (possibly replaced) ordinary version...

The "as if" requirement implies that any observable effects of
"the (possibly replaced) ordinary version" must be preserved.
The repeated calls to the new handler are among such effects.

Martin



More information about the Libstdc++ mailing list