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]

"new" statement and -fno-exceptions


We recently ran into some problems with an application being killed by
unhandled exception processing -- even though it's compiled
-fno-exceptions. 

It turns out that a "new" statement will throw an exception on alloc
failure (if the "nothrow" variant isn't used) no matter whether
-fno-exceptions is used or not.  This is somewhat surprising; it would
make sense for the code generator to call the nothrow new operator in
this case.  The docs don't say one way or the other.

I suppose I can supply my own operator new(size_t) as a workaround...

     paul


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