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?


--- unit1.pas ---

interface

var
  someProc : TProcedure;

--- unit2.pas ----

uses
  unit1;

procedure MyProc;

initialization
  someProc := @MyProc;

--- program.pas

uses
  unit1, unit2;

begin
  writeln('hello world');
end.

thanks,
dmitry
_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to