At 1st, no!
Exception handling comes with some cost, mainly by requiring RTTI support primarily IMHO (didn't prove this experimentally so far). RTTI support will lead to some expense use of your code's text segment, especially if there are a lot of template instantiations (e.g. using STL templated classes/container-classes extensively with lot of various types).
On the other hand, compared to other possibilities to reduce e.g. newlib required implementations, the cost of 60k overhead is not so much.
You really should think twice about letting exception support go!
Funny enough, I've discussed this topic with my colleagues today, when we where facing an error that was obviously caused by an out of memory situation. The firmware in question (and it's OS bindings to FreeRTOS) don't support exceptions, but memory management implementation would trigger a processor exception, if you cannot acquire a certain amount of heap memory using new()
. This might happen using some STL induced algorithm, and you have no chance to intercept this using a try/catch
block on failure (e.g. usage of a simple std::vector
).
So you should decide how you might handle error situations, without using exceptions or not, and being sure to provide consistent behavior e.g. for usage of common STL patterns, etc., and weigh this out of the cost you pay for .text
section size.