[fpc-devel] Generated code of constant parameters of double type

Florian Klaempfl florian at freepascal.org
Sun Nov 16 14:52:01 CET 2008


Luiz Americo Pereira Camara schrieb:
> Florian Klaempfl escreveu:
>> Luiz Americo Pereira Camara schrieb:
>>> While discussing if is worth using const parameters for string and 
>>> double types in a Lazarus bug report ( 
>>> http://bugs.freepascal.org/view.php?id=12642 ), it was noticed that 
>>> does not make difference using constant parameters or not for double 
>>> types.
>>>
>>> So is this the expected behavior or a bug in fpc?
>>
>> It is the expected behaviour.
>>
> 
> Thanks.
> 
> Maybe the documentation 
> (http://www.freepascal.org/docs-html/ref/refsu50.html#x126-13300011.4.4) 
> can be modified to clarify this since the statement:
> 
> "A constant argument is passed by reference if its size is larger than a 
> pointer."
> 
> leads to the conclusion that double types (8 bytes) would be passed as 
> reference in 32bit code.

Well, the bigger problem is that this is target dependent.



More information about the fpc-devel mailing list