Hello,
In C++, I would like to take advantage of throw() clauses for their
documentative value (and possible future value if gcc implements
checked exceptions). At the same time however, I want to *usefully*
handle the throwing of unexpected exceptions (where "useful" includes
being able to inspect the exception in question).
Toward this end I have a couple of questions that my Googling has not
helped:
* gcc has an option -fno-enforce-eh-specs which has pretty much the effect
I would want because it allows for generic top-level catch() statements
that exit with a useful error message. The man-page says the compiler
"will still optimize based on the exception specifications". Should I
interpret this as saying it is *unsafe* to enable this option with
code that *does* throw unexpected exceptions? If not, is it guaranteed
to *be* safe?