mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 20:49:26 +02:00
* farpointer and normal pointer aren't compatible
This commit is contained in:
parent
3c6d0efadc
commit
efcc15cfee
@ -1003,6 +1003,9 @@ implementation
|
|||||||
else
|
else
|
||||||
{ pointer with an equal definition are equal }
|
{ pointer with an equal definition are equal }
|
||||||
if (def1^.deftype=pointerdef) and (def2^.deftype=pointerdef) then
|
if (def1^.deftype=pointerdef) and (def2^.deftype=pointerdef) then
|
||||||
|
begin
|
||||||
|
{ check if both are farpointer }
|
||||||
|
if (ppointerdef(def1)^.is_far=ppointerdef(def2)^.is_far) then
|
||||||
begin
|
begin
|
||||||
{ here a problem detected in tabsolutesym }
|
{ here a problem detected in tabsolutesym }
|
||||||
{ the types can be forward type !! }
|
{ the types can be forward type !! }
|
||||||
@ -1011,6 +1014,9 @@ implementation
|
|||||||
else
|
else
|
||||||
b:=ppointerdef(def1)^.pointertype.def=ppointerdef(def2)^.pointertype.def;
|
b:=ppointerdef(def1)^.pointertype.def=ppointerdef(def2)^.pointertype.def;
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
b:=false;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
{ ordinals are equal only when the ordinal type is equal }
|
{ ordinals are equal only when the ordinal type is equal }
|
||||||
if (def1^.deftype=orddef) and (def2^.deftype=orddef) then
|
if (def1^.deftype=orddef) and (def2^.deftype=orddef) then
|
||||||
@ -1488,11 +1494,15 @@ implementation
|
|||||||
{ in my opnion, is this not clean pascal }
|
{ in my opnion, is this not clean pascal }
|
||||||
{ well, but it's handy to use, it isn't ? (FK) }
|
{ well, but it's handy to use, it isn't ? (FK) }
|
||||||
is_equal(ppointerdef(def_from)^.pointertype.def,voiddef) then
|
is_equal(ppointerdef(def_from)^.pointertype.def,voiddef) then
|
||||||
|
begin
|
||||||
|
{ but don't allow conversion between farpointer-pointer }
|
||||||
|
if (ppointerdef(def_to)^.is_far=ppointerdef(def_from)^.is_far) then
|
||||||
begin
|
begin
|
||||||
doconv:=tc_equal;
|
doconv:=tc_equal;
|
||||||
b:=1;
|
b:=1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
procvardef :
|
procvardef :
|
||||||
begin
|
begin
|
||||||
{ procedure variable can be assigned to an void pointer }
|
{ procedure variable can be assigned to an void pointer }
|
||||||
@ -1700,7 +1710,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.19 2000-11-06 22:30:30 peter
|
Revision 1.20 2000-11-11 16:13:31 peter
|
||||||
|
* farpointer and normal pointer aren't compatible
|
||||||
|
|
||||||
|
Revision 1.19 2000/11/06 22:30:30 peter
|
||||||
* more fixes
|
* more fixes
|
||||||
|
|
||||||
Revision 1.18 2000/11/04 14:25:22 florian
|
Revision 1.18 2000/11/04 14:25:22 florian
|
||||||
|
Loading…
Reference in New Issue
Block a user