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

Martin Sebor msebor@gmail.com
Wed Nov 4 14:52:00 GMT 2015


> I share your concerns, but I'm also sympathetic to the changes that
> the Taller Technologies team are trying to make, to allow libstdc++ to
> be more useful in exception-free systems.
>
> At the very least the patch to doc/xml/manual/configure.xml must
> document that this option enables behaviour that violates the standard
> and so produces a non-conforming implementation. It should probably
> also explain how to use the resulting implementation, so that users on
> embedded systems who might want to enable this know how to write a
> suitable new-handler.

If there is a problem with programs too easily getting themselves
into an infinite loop because of improperly written new handlers
it might be worth proposing a change to C++ to make the minimum
number of iterations the loop must make before giving up
implementation-defined. That way this could be handled the same
way regardless of the environment.

Martin



More information about the Libstdc++ mailing list