[fpc-pascal] Conversion between ordinals and pointers is not portable

Roland Turcan konf at rotursoft.sk
Wed Mar 2 09:02:25 CET 2011


Hello all,

I have this code:

TYPE  PRDBRecord  =^TRDBRecord;
      TRDBRecord  =PACKED RECORD
                     Content :ARRAY [0..65500] OF BYTE;
                   END;


VAR MOffset:INTEGER;
    p      :PByteArray;
    FData  :PRDBRecord;

  ...
  p := PByteArray (PtrUInt (@FData.Content[0]) + MOffset);
  ...


But the compiler informs about %subj%.

How to get rid of this warning and to make code portable?

Thanks in advance.

-- 
Best regards, TRoland
http://www.rotursoft.sk
http://exekutor.rotursoft.sk




More information about the fpc-pascal mailing list