[fpc-devel]Freepascal bug?

Tamas Konkoly tcc_inq at freemail.hu
Mon Oct 13 21:50:20 CEST 2003


Hi,

I found a problem in fpc. I don't know that this is a bug or not.
I would like to know why don't work the first d declaration.
The second declaration work only well, because I checked it.

type TR=record
       a,b,c:longint;
     end;
var data:array[0..100]of TR;
procedure pp(var r:TR);
var d:^TR;
begin
d:=@r[20]; // << this is not compileable
d:=@r+20*sizeof(TR); // << this is compileable
end;

begin
pp(data[0]);
end.


Tcc






More information about the fpc-devel mailing list