[fpc-pascal] SIGSEGV when using varargs calling
silvioprog
silvioprog at gmail.com
Tue Jan 26 12:59:36 CET 2016
On Mon, Jan 25, 2016 at 4:05 AM, Sven Barth <pascaldragon at googlemail.com>
wrote:
> Am 25.01.2016 04:42 schrieb "silvioprog" <silvioprog at gmail.com>:
> > What I'm doing wrong? Can I use this callings on FPC in the DELPHI
> mode?! :-/
>
> Neither FPC nor Delphi allow you to declare your own varargs functions.
> That it works in Delphi is by pure change. Trying to outsmart the compiler
> will only lead to trouble.
>
Indeed [1]. I found some Delphi programmers using this (wrong) calling,
eg[2][3]. :-/
[1]
http://docwiki.embarcadero.com/RADStudio/Seattle/en/E2277_Only_external_cdecl_functions_may_use_varargs_(Delphi)
[2] http://www.swissdelphicenter.ch/torry/showcode.php?id=2114
[3]
http://tobysoft.net/wiki/index.php?Delphi%2F%B2%C4%CA%D1%C4%B9%B0%FA%BF%F4%A1%CAvarargs%A1%CB
--
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160126/98603ab7/attachment.html>
More information about the fpc-pascal
mailing list