|
@@ -1339,18 +1339,16 @@ implementation
|
|
|
end;
|
|
|
pointerdef :
|
|
|
begin
|
|
|
-{$ifdef x86}
|
|
|
{ check for far pointers }
|
|
|
- if (tcpupointerdef(def_from).x86pointertyp<>tcpupointerdef(def_to).x86pointertyp) then
|
|
|
+ if not tpointerdef(def_from).compatible_with_pointerdef_size(tpointerdef(def_to)) then
|
|
|
begin
|
|
|
if fromtreetype=niln then
|
|
|
eq:=te_equal
|
|
|
else
|
|
|
eq:=te_incompatible;
|
|
|
end
|
|
|
+ { the types can be forward type, handle before normal type check !! }
|
|
|
else
|
|
|
-{$endif x86}
|
|
|
- { the types can be forward type, handle before normal type check !! }
|
|
|
if assigned(def_to.typesym) and
|
|
|
((tpointerdef(def_to).pointeddef.typ=forwarddef) or
|
|
|
(tpointerdef(def_from).pointeddef.typ=forwarddef)) then
|
|
@@ -1422,11 +1420,7 @@ implementation
|
|
|
this is not allowed for complex procvars }
|
|
|
if (is_void(tpointerdef(def_to).pointeddef) or
|
|
|
(m_mac_procvar in current_settings.modeswitches)) and
|
|
|
- tprocvardef(def_from).is_addressonly
|
|
|
-{$ifdef x86}
|
|
|
- and (tcpupointerdef(voidcodepointertype).x86pointertyp=tcpupointerdef(def_to).x86pointertyp)
|
|
|
-{$endif x86}
|
|
|
- then
|
|
|
+ tprocvardef(def_from).compatible_with_pointerdef_size(tpointerdef(def_to)) then
|
|
|
begin
|
|
|
doconv:=tc_equal;
|
|
|
eq:=te_convert_l1;
|
|
@@ -1437,11 +1431,7 @@ implementation
|
|
|
{ procedure variable can be assigned to an void pointer,
|
|
|
this not allowed for methodpointers }
|
|
|
if (m_mac_procvar in current_settings.modeswitches) and
|
|
|
- tprocdef(def_from).is_addressonly
|
|
|
-{$ifdef x86}
|
|
|
- and (tcpupointerdef(voidcodepointertype).x86pointertyp=tcpupointerdef(def_to).x86pointertyp)
|
|
|
-{$endif x86}
|
|
|
- then
|
|
|
+ tprocdef(def_from).compatible_with_pointerdef_size(tpointerdef(def_to)) then
|
|
|
begin
|
|
|
doconv:=tc_proc_2_procvar;
|
|
|
eq:=te_convert_l2;
|