[fpc-devel] Capturing addresses
borsa77 at libero.it
Sun Nov 10 16:48:51 CET 2019
Il 10/11/2019 14:36, Jonas Maebe ha scritto:
> Does anyone know what the accepted/excepted behaviour is regarding the
> capture of addresses of var/out/const-by-address/constref parameters?
> For example:
> g: longint;
> p: plongint;
> procedure test(var l: longint);
> The question is: should the compiler by default assume that such
> addresses are not captured, or that they are captured? Does anyone know
> if a lot of code exists that does this?
To me p:=@l should be simply refused by the compiler as it happens in
case of p:=l.
More information about the fpc-devel