[fpc-devel] How FPC handles dynamic arrays with const modifier?
hnb.code at gmail.com
Tue Aug 13 07:56:37 CEST 2013
> It is undefined how it is passed (and how it is passed can change from
> version to version, although we will never change such details just because
> we can). Relying on such implementation details is wrong, regardless of
> what Delphi does. We do not aim to create a code generator that creates
> exactly the same code as Delphi, we only work towards compatibility at the
> Pascal language level (that does not include pointer hacks to peek at
> implementation details) and only to the extent that this Pascal-level
> behaviour is documented.
> The behaviour of "const" is implementation-defined in FPC. There is no
> guarantee regarding how it affects parameter passing at the low level for
> non-cdecl/cppdecl/mwpascal calling conventions.
But in this case the behaviour of "const" (for dynamic arrays) is the
default for register calling convention (independent of the Pascal language
level, this is the low level behaviour forced by the register calling
convention)... Probably. ;) Should I report it to Bugtracker?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel