Am 22.01.2014 18:42, schrieb Florian Philipp: > Hi list! > > I'm wondering if anyone tried setting -fnothrow-opt as a CXX_FLAG in > make.conf? > > It makes C++ throw() statements behave like C++11 nothrow. This could > have measurable performance benefits and will reduce code size. The only > downside is that, when a function violates its throw() guarantee, > terminate() will be called instead of unexpected(). > > However, neither function is allowed to do anything but terminate the > program. So all you possibly lose is a meaningful error message just > before the program crashes. > > So, what do you think? Safe to enable by default? > > Thanks in advance! > Florian Philipp >
As a follow-up: I grepped all distfiles to identify candidates for testing this flag. The only package that I have installed (KDE desktop) that makes regular use of throw() statements is LibreOffice. However, since LO already enables the similar -fno-enforce-eh-specs flag, there seems to be no significant advantage in enabling -fnothrow-opt. Other packages only use these statements in the rare cases that it is required for STL compatibility (subclassing extensions, specializing templates). For now I add -fno-enforce-eh-specs and -fnothrow-opt to my CXXFLAGS but I doubt it will help much. Regards, Florian Philipp
signature.asc
Description: OpenPGP digital signature