[fpc-pascal] Stack alignmennt in call from C++ to FPC
jonas.maebe at elis.ugent.be
Wed Jun 5 22:44:56 CEST 2013
On 05 Jun 2013, at 15:04, Josue Andrade Gomes wrote:
> Some references (eg (2)) claim that MSVC aligns the stack at 4-byte
> boundaries while GCC aligns
> at 16-byte boundaries. I have found no confirmation on those claims.
Stack alignment is not a compiler property, but a platform property. The stack alignment on Win32 is 4 bytes. On Linux/i386 it used to 4 bytes, but there has been an unofficial switch to 16 bytes (which, in all fairness, was pushed by gcc for SSE/performance reasons).
I don't immediately see what the problem is in your case. Usually it's a mismatch of calling conventions, but that seems to be fine in the code you posted.
More information about the fpc-pascal