> So it seems that passing them by value actually corresponds to what the 
> Delphi docs say.

Jonas, I agree, the documentation definitely does address the issue,
which was where that conversation was derailed.

Regarding actual implementation, I previously posted the full source
to a test program with the results. The conclusion was that Delphi and
FPC work the same, except when the convention is changed to cdecl.
Under cdecl FPC returns "R is a structure on the stack" and Delphi
returns "R refers to a reference on the stack".

If anyone wants to repeat the tests, the source code is located under
the link you last provided. Just change the calling convention of
function A to see how the compiler handles parameters differently.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to