This is the mail archive of the
mailing list for the GCC project.
Re: Keeping unreachable code
- From: Casper Hornstrup <chorns at users dot sourceforge dot net>
- To: gcc at gcc dot gnu dot org
- Cc: Robert Dewar <dewar at gnat dot com>
- Date: Mon, 4 Feb 2002 00:10:04 +0100
- Subject: Re: Keeping unreachable code
- References: <20020203223739.B16CEF28C5@nile.gnat.com>
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.