diff --git a/compiler/i8086/symcpu.pas b/compiler/i8086/symcpu.pas index 531f044670..6f00d04e68 100644 --- a/compiler/i8086/symcpu.pas +++ b/compiler/i8086/symcpu.pas @@ -130,6 +130,7 @@ type - it has no 'near' or 'far' specifiers - it is compiled in a $F- state } function default_far:boolean; + procedure Setinterfacedef(AValue: boolean);override; public constructor create(level:byte;doregister:boolean);override; function getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp):tstoreddef;override; @@ -396,6 +397,14 @@ implementation end; + procedure tcpuprocdef.Setinterfacedef(AValue: boolean); + begin + inherited; + if (current_settings.x86memorymodel in x86_far_code_models) and AValue then + include(procoptions,po_far); + end; + + function tcpuprocdef.is_far: boolean; begin result:=(po_exports in procoptions) or diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 58939e0a7a..3c5d01c522 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -742,7 +742,7 @@ interface function Getforwarddef: boolean; procedure Setforwarddef(AValue: boolean); function Getinterfacedef: boolean; - procedure Setinterfacedef(AValue: boolean); + procedure Setinterfacedef(AValue: boolean);virtual; function Gethasforward: boolean; procedure Sethasforward(AValue: boolean); function GetIsEmpty: boolean;