I would like to use EH in my programs but I have found the size increase is
too big. The object code grows a bit, that's not a big problem. But the
linked exe or
dll includes an almost ~50 KB size increase with respect to the same file
with no exception support.
In fact, to fully disable exceptions (apart from
using -fno-exceptions -fno-rtti) I had to redefine operators new and delete
to not throw exceptions. Otherwise the 50 KB load was still there.
I examined the executable and it contained lots of functions for unwinding
the stack, calling global constructors and destructors and so on. But, is
all that extra code really necessary? Can't it be shared from a DLL? AFAIK,
MSVC++ doesn't add so much stuff to exception aware programs (maybe they use
shared code from their runtime dll).
I know exceptions are the good way to handle errors in modern C++, and that
+50 KB is not too much for normal applications. But I like small programs
Can this extra size be reduced somehow?