On Thu, Apr 09, 1998 at 05:15:59PM -0600, Jason Gunthorpe wrote: > > On Thu, 9 Apr 1998, Marcus Brinkmann wrote: > > > Exception handling is a powerful feature, and makes other global error > > strategies mostly unnecessary. Therefore the size of compiled and well > > written C++ programs will not be larger than an equivalent C program. *And* > > the source code will be much cleaner, as you don't have to nest if() > > statements or such things. > > Actually egcs just has a gross implementation of exceptions, the overhead > added for the stack unwinding is horribly high, I have't looked too deeply > but it may be a fixed overhead per-function and then some added stuff > depending on the function's content so if you have lots of small functions > you get burned really badly.
This is a problem of egcs (gcc). C++ on Linux *is* horrible at the moment. But this does not say anything about the language feature in the standard and how it *could* be implemented. Not using exceptions is curing the symptoms but not the disease. > As I said before, the exception handling information doubles the size of > my binaries (+100k, + 240k, etc) which is pretty bad. I still think that without using exception handling you have to write error handling code by yourself. If you do it good, you double the size of your program either way (approx. 50% of C code is error handling, when the programmer cares about erro handling, esp. in large projects). Marcus -- "Rhubarb is no Egyptian god." Debian GNU/Linux finger brinkmd@ Marcus Brinkmann http://www.debian.org master.debian.org [EMAIL PROTECTED] for public PGP Key http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ PGP Key ID 36E7CD09 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]