[fpc-devel] Question on constref

Sven Barth pascaldragon at googlemail.com
Thu Feb 2 07:58:13 CET 2023


Adriaan van Os via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am
Do., 2. Feb. 2023, 02:47:

> Sven Barth via fpc-devel wrote:
>
> > There is no full documentation for that parameter modifier (someone
> > might want to file a bug report for that), but the documentation for
> > “const” (
> >
> https://www.freepascal.org/docs-html/current/ref/refsu67.html#x183-20700014.4.4
> > ) contains this:
> >
> > === doc begin ===
> >
> > Contrary to Delphi, no assumptions should be made about how const
> > parameters are passed to the underlying routine. In particular, the
> > assumption that parameters with large size are passed by reference is
> > not correct. For this the constref parameter type should be used, which
> > is available as of version 2.5.1 of the compiler.
> >
> > === doc end ===
>
> On debate, see FPC issue 17442.
>

There is no debate planned for this in the near future. So even if this
might change some time in the future it does not *now* and very likely also
not for 3.4.0. Not to mention that things wouldn't change for most
platforms anyway, because they only have the platform ABI available and
that *must not* change for compatibility with C code.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20230202/2a71155e/attachment.htm>


More information about the fpc-devel mailing list