This is the mail archive of the gcc-help@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 am compiling a C++ application, which uses the 'new' operator, with
exceptions disabled (-fno-exceptions).

Yet, the new operator called is the one that throws an exception in case
of failure. Why is it so ? Isn't it inconsistent with the -fno-exceptions flag?


I imagined that compiling with -fno-exceptions would make the compiler
generate calls to new(nothrow) instead.

In my case, replacing all calls to new to new(nothrow) in the
application is not an option.

Thanks,

Christophe.


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