20.11.2011 23:38, Jonas Maebe пишет:

On 20 Nov 2011, at 21:18, Florian Klämpfl wrote:

Sorry, I meant recordalignmin.

And I didn't think of that setting. Yes, that should indeed work.


It doesn't, {$codealign recordnmin} changes only alignment of fields within the record, not alignment of the record itself. In the following example:

{$mode objfpc}{$h+}
unit a;

interface

{$codealign recordmin=16}
type
  arr=record x,y: int64 end;

  t=record
    a1: arr;
    a2: word;
  end;

implementation

end.

you get sizeof(arr)=24, sizeof(t)=40, while recordalignment of t stays equal to 
8.

Regards,
Sergei
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to