[fpc-pascal] Problem with FPC2.0.2 and windows
cirkulation at maartensson.net
Wed Jan 4 23:46:35 CET 2006
Jonas Maebe wrote:
> On 04 Jan 2006, at 21:51, Hans Mårtensson wrote:
> 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
OK, then I really don't understand where the problem is.
It seems difficult to me to supply a bug report, because it is still so
uncertain where the problem lies.
But I attach the source code to my test program, in case you can do
anything with it.
When I compile this source code with FPC 1.0.10, it produces a program
that makes a window with one menu item. When you click on it, a dialogue
box pops up.
But when I compile the same source code with FPC 2.0.2, I still get a
program that makes the window. But the dialogue box does not show, when
you click the menu item.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the fpc-pascal