psub.pas, read_proc:

* always register implementation-only, public routines as they might only be called from other units using an external declaration

git-svn-id: trunk@33967 -
This commit is contained in:
svenbarth 2016-06-12 13:47:08 +00:00
parent a4cfa64d96
commit e527b6fe4f

View File

@ -2211,6 +2211,17 @@ implementation
end;
end;
{ always register public functions that are only declared in the
implementation section as they might be called using an external
declaration from another unit }
if (po_global in pd.procoptions) and
not pd.interfacedef and
([df_generic,df_specialization]*pd.defoptions=[]) then
begin
pd.register_def;
pd.procsym.register_sym;
end;
{ make sure that references to forward-declared functions are not }
{ treated as references to external symbols, needed for darwin. }