On Fri, Apr 10, 2009 at 02:22:06PM +0400, dmitry boyarintsev wrote:
> Can compiler detect, if initialized procedure variable is not used and
> smartlink it off?
> In the following example:
> there's a global procedure variable. it's initialized by unit2, that
> is used by program.
> but even if it's initialized, the procedure itself (someProc) is never called.
> So, is it possible to cut off someProc and MyProc as well?

In theory this could be done I think, but it is a global optimization, and
is currently not yet done.
 
Global optimization have a lot of practical concerns though since they often
require multiple compilation passes, and thus a lot of infrastructure to
make it end-user ready.
_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to