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]
Other format: [Raw text]

C++: operator new and disabled exceptions


Hello,

I have already asked this question on gcc-help (see http://gcc.gnu.org/ml/gcc-help/2007-09/msg00328.html), but I would like advice from GCC developers.

Basically, when I compile with -fno-exceptions, I wonder why the G++ compiler still generates calls to the standard new operator (the one that throws bad_alloc when it runs out of memory), rather than new(nothrow) (_ZnwjRKSt9nothrow_t) ?

In addition, do you think I can patch my GCC such that it calls new(nothrow) when compiling with -fno-exceptions, or is it a bad idea? (compatibility issues, ...)

Thanks for your recommendation,

Christophe.


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