Keeping unreachable code
Casper Hornstrup
chorns@users.sourceforge.net
Sun Feb 3 15:18:00 GMT 2002
On Sunday 03 February 2002 23:37, you wrote:
> <<So GCC will not throw away a function that it cannot see is called from
> anywhere? It is only a few instructions that is in this routine so I would
> prefer to keep it in the function if possible. It could be as simple as:
>
>
> The compiler cannot throw away a function that could potentially be
> called from some other file.
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 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.
More information about the Gcc
mailing list