This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]