Here is a distilled program:
Program TestHandler;
Procedure RUSHandler(Flags,CS,IP,AX,BX,CX,DX,SI,DI,DS,ES,BP: Word);
Begin
end; {RUSHandler}
Procedure SetInterrupts(IntHandler: Pointer; InterruptFrequency: Single);
Begin
If (IntHandler <> @RUSHandler) then
{do something}
end;
Begin {Main program}
SetInterrupts(@RUSHandler, 5000.0)
end.
I verified that Lazarus was using no optons but -So, and it still had a compiler error that I do not get when I invoke the compiler from the command line with -Mtp. I do see that the forced typecasting as suggested by Marc "Pointer((@RUSHandler)" did work, so this becomes less important. I still wonder why the results differ...