[fpc-pascal] Problem with FPC2.0.2 and windows

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Jan 4 22:09:21 CET 2006

On 04 Jan 2006, at 21:51, Hans MÃ¥rtensson wrote:

>>> Does PPC 2.0.2 handle alignment of data the same way as former   
>>> versions?
>> The statements below have nothing to do with alignment.
> The type of pBoxtemplate is ^word.
> Is it not true that
>  (dword(pBoxtemplate) and 1)=1
> evaluates to TRUE, if and only if pBoxtemplate is NOT aligned to a  
> word boundary (16 bit boundary)?
> And then, assuming pBoxtemplate is aligned to word boundary, is it  
> not true, that
>  if (dword(pBoxtemplate) and 2)=2
> evaluates to TRUE, if pBoxtemplate is NOT aligned to a dword  
> boundary (32 bit boudary), causing the statement
>  if (dword(pBoxtemplate) and 2)=2 then inc(pBoxtemplate);
> to make the pBoxtemplate align to a dword boundary (by eventually  
> adding 2 to pBoxtemplate (because sizeof(word)=2)??

Yes, but this is independent of how the compiler handles alignment of  


More information about the fpc-pascal mailing list