[fpc-pascal] cdecl or stdcall on WinCE for ARM

Henry Vermaak henry.vermaak at gmail.com
Fri Nov 23 13:19:16 CET 2007


On 23/11/2007, Adrian Veith <adrian at veith-system.de> wrote:
> Hi,
>
> what is the right calling convention for using system libraries on wince
> for ARM ?
>
> I wrote a pascal wrapper for a system dll and used stdcall for the
> calling convention - and the program worked.
> I changed to cdecl - and the program works as well.
>
> In my opinion the program should have crashed on one of the two.
>

i guess those calling conventions don't exist on arm.  the compiler
probably just ignores them and chooses the default one.  there should
be a warning/note for this, imho.  gcc does do that, iirc.

(i think arm only has a "normal" and a soft fpu calling convention)

> Now I am puzzled.
>
> Cheers,
>
> Adrian.

henry



More information about the fpc-pascal mailing list