Thread (3 messages) 3 messages, 3 authors, 1999-12-18

Re: dead code removal

From: Jeremy Fitzhardinge <hidden>
Date: 1999-12-18 20:08:59

On 25-Nov-99 Jeffrey Karl Lassahn wrote:
In principle it can be if the function is marked static (so the compiler
knows it will never link outside the module.)  Does anyone know if GCC
does remove the code in this case?
No, only if its inline.  Just because the compiler can't see a reference, it
doesn't mean one isn't there - inline assember may refer to the static function.

Basically, you need the linker to strip dead functions, because nothing else
has enough information to do it right.

        J

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help