Bart wrote: > > Q1: do we have some documentation about this overload selection process? > > Q2: if not, then is the observed behaviour of current fpc by design or > > undefined?
Depending on the mode @variable can return an untyped pointer (@my_integer is type Pointer) or a typed pointer (@my_integer is type ^integer). The compiler uses the type to determine which overloaded procedure to call. https://www.freepascal.org/docs-html/prog/progsu75.html "In the {$T+} or {$TYPEDADDRESS ON} state, the @ operator, when applied to a variable, returns a result of type ^T, if the type of the variable is T. In the {$T-} state, the result is always an untyped pointer, which is assignment compatible with all other pointer types." See also: https://wiki.freepascal.org/Pointer#Data_Type _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel