[fpc-devel]Delphi incompatibilities and bugs in last available 1.1 snapshot

Pavel V. Ozerski pavel at insect.mail.iephb.ru
Mon Oct 28 16:22:50 CET 2002


This program compiled with Delphi works fine but cannot be compiled
with FPC 1.1 (build 2002/08/01):

{$apptype console}
function xx:longint;
 begin
  xx:=1;
 end;
type
 txx=function:longint;
var
 x:txx;
 p:pointer;
 y:pointer absolute x; //causes FPC compiler error message
begin
 x:=@xx;
 p:=pointer(x);//xx result typecasting
 writeln(longint(p));
 p:=@x;//xx entry point;
 writeln(longint(p));
 p:=@xx;//xx entry point;
 writeln(longint(p));
 p:=@y;//address of x variable;
 writeln(longint(p));
 p:=@@x;//address of x variable, causes FPC compiler error message
 writeln(longint(p));
end.

At it is shown, there are exust two problems: 1) a procedural variable
cannot be absolute to other variable; 2) access to address of
procedural variable using @@ is not supported.BTW, using addr(@x) also
causes compiler error message.

Sincerely, Pavel V. Ozerski.

P.S. I don't submit this report into bug list because I didn't test
this sample with official 1.0.x releases.







More information about the fpc-devel mailing list