This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: -fno-exceptions documentation


Benjamin Kosnik wrote:
Thanks Peter.  That's a cleaner solution as it moves the #ifdef
__EXCEPTIONS out of op new and into throw_exception(), although we
might also want to pass a const char* to make it a little easier in
the non-throwing case, maybe not for bad_alloc... :-)

Suggest you find


include/bits/funcexcept.h

Anyway, if you come up with a way to pull this off without having to
recompile op new (or another part of the lib) when flipping
exceptions on/off, that would really be cool! (your challenge for the
week ;-)).

Not possible.

Isn't there some __attribute__ magic that allows multiple function definitions coming from a header included in several translation units? (Similar to a template implicit instantiation.) This could allow a libstdc++ header to inject the appropriate definition of __throw_bad_alloc into user code. The library itself would contain no implementations.



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