[fpc-devel] calling convention on mac

Carlo Kok ck at remobjects.com
Wed Nov 28 22:23:25 CET 2012


Op 28-11-2012 22:15, Jonas Maebe schreef:
>
> On 28 Nov 2012, at 22:04, Carlo Ko wrote:
>
>> Op 28-11-2012 21:50, Jonas Maebe schreef:
>>>
>>> On 28 Nov 2012, at 21:36, Martin wrote:
>>>
>>>> It does not matter if I compile it with stdcall, cdecl, pascal.
>>>> The below on a 32 bit intel mac (fpc 2.6.0) always returns
>>>> result in 2 registers (eax, edx)
>>>>
>>>> Is there a way to change this (some declaration in the source,
>>>> some switch)?
>>>
>>> It's a bug that's fixed in trunk:
>>> http://wiki.freepascal.org/User_Changes_Trunk#Location_of_certain_function_result_types
>>
>>
>>>
As the author of pascalscript, I wasn't aware of this issue, however now 
I'm in a dilemma. FPC breaks things very often, and that url shows just 
one of these.
>
> It's not useful to talk in general terms when discussing specific
> issues. Would you have preferred that this particular bug had
> remained in the compiler, in the interest of backward compatibility?

I suppose you're right. I'm just frustrated.

>
> Additionally, the URL does not just show "one of these", but a "bunch
> of those". We do our best to document every such case, and always in
> the same place on the wiki.
>
>> If I want to fix this bug in Pascal Script, I have to undo the fix
>> in 6-12 months again (or use version specific defines).
>
> The correct fix is indeed an version-specific define.

Oke.

>
>> I'm getting a bit frustrated with FPC changing things back and
>> forward all the time (this isn't a new thing, this has been going
>> on since I first ported it to FPC).
>
> "back and forward" suggests that we change it in one way in one
> version, and then back again to the old behaviour in a successive
> version. Afaik that has never happened until now. We do occasionally
> fix bugs that break backward compatibility, but as explained above I
> don't see an alternative to leaving in such bugs forever.
>

The constructor call abi was changed twice (1 or 2 years ago), the last 
change undid the first. That said, yes, you are right, bugs should be 
fixed. I'd just like to be able to say "it works with all these 
versions", instead of specific ones.




More information about the fpc-devel mailing list