[fpc-pascal] Firebird +lin32 + fpc lib udf returns garbage.

Coco Pascal coco.pascal at xs4all.nl
Mon Jun 1 21:06:15 CEST 2009


Jonas Maebe wrote:
>
> On 01 Jun 2009, at 14:39, Coco Pascal wrote:
>
>> But if I add the following function it returns wrong results. This 
>> one does refer to other code.
>>
>> function Y_Odd(const AValue: LongInt): LongInt; cdecl; export;
>> begin
>> if Odd(AValue) then
>> Result := -1
>> else
>> Result := 0;
>> end;
>
> It doesn't anymore once it is compiled, because odd() gets inlined.
>
So, what do think? A simple module contains two simple functions. On 
win32 it works fine. On lin32 one function works as expected, the other 
returns garbage (0 or null). Is the problem linux, firebird or fpc related?



More information about the fpc-pascal mailing list