[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: egcs produces bloated code by default

On Mon, 26 Oct 1998, Amos Shapira wrote:

> On Mon, October 26 1998, Avery Pennarun <apenwarr@worldvisions.ca> wrote:
> |My understanding (which may be pathetic) was that _all_ functions in the
> |program must be compiled with exception-handling enabled if we want it to
> |work correctly.  I thought that would include libc (which is C only) as well
> |as applications.
> |
> |I guess I was wrong.
> I'm guessing here as well, but the main target of exception hendling
> is cleanup of automatic objects (were exceptions are not cought
> explicitly), so since C functions don't create automatic objects they
> are more or less "transparent" to exceptions (as well as C++ functions
> with same characteristics).

If only it optimized such a case.. I don't think it does :< Actually you
can disable exception handling for some functions in a program (other wise
you could never link with libstdc++!). When it is disabled I think you'll
find that object cleanup simply never happens for those functions or
possibly abort() is called, I don't know the specifics. C definately has
'nothing' to do for exception clean up but having an exception pass
through a C function could be hugely destructive which is why I'd kinda
expect the abort().

Reply to: