Giulio Bernardi wrote:
Sorry I made the wrong example. The problem isn't in the dereferencing of the pointer,
but in accessing record fields. Here is simpler example:

Perhaps both, because I tried to change the GetMem line to:

 constructor TGenClass.Create;
 var p : _TPRec_;
 begin
   GetMem(p,sizeof(p^));
   p^.data1:=1;

and now I had 3 compile errors :-). I think this should work, and it's a bug (or both depending on point of view).

Micha
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to