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]

Re: -fno-exceptions and bad_alloc


> From: "Thomas van Gulick" <list@Cal040031.student.utwente.nl>
> To: <gcc@gcc.gnu.org>
> Date: Tue, 28 Sep 1999 02:26:03 +0200

> When using -fno-exceptions I still get bad_alloc exceptions thrown
> at me when the new operator fails. I also tried the fno-check-new
> flag to no avail.  Is there any way to really really turn off
> exception handling and throwing?

Right!  Don't call things that can allocate with new, don't use new.
Always call new (nothrow), and you'll be set.

Override the normal new with one that aborts.  I am sure that you can
then find all the uses of new fairly quickly and easily.

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