This is the mail archive of the
mailing list for the GCC project.
Re: Keeping unreachable code
- From: dewar at gnat dot com (Robert Dewar)
- To: chorns at users dot sourceforge dot net, gcc at gcc dot gnu dot org
- Cc: dewar at gnat dot com
- Date: Sun, 3 Feb 2002 18:18:34 -0500 (EST)
- Subject: Re: Keeping unreachable code
<<It can if it thinks it is 'dead' code and it does since no jumps targets the
code. The address of the exception handler is kept in a table so the runtime
library can find it.
It cannot throw away a fucntion that could potentially be called from
some other file, that's obvious, and that's what you disagreed with.
<<It is not a whole C function it throws away...it is part of the code I
have modified it to emit for __try/__except blocks.
Then it is not a function, and has nothing to do with what I said. Of course
it will throw away code of the kind you describe. In fact I think you are
persuing a lost cause here. Optimization will kill you in general (we have
found that in the move from GCC 2.8.1 to GCC 3 for GNAT, it was impossible
to keep the old GNAT zero cost exception mechanism working, because of
optimziations -- not only throwing away code, but more importantly, moving
code around in ways that are inconsistent with the model -- I bet you will
run into the same problem.
Why are you doing this at all?