C++: operator new and disabled exceptions
Christophe LYON
christophe.lyon@st.com
Thu Sep 27 13:33:00 GMT 2007
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.
More information about the Gcc-help
mailing list