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

Luiz Americo Pereira Camara pascalive at bol.com.br
Sun Nov 16 14:50:26 CET 2008


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.

Luiz



More information about the fpc-devel mailing list