[fpc-devel] Does FPC optimize unused parameters ?
Martin
lazarus at mfriebe.de
Fri Aug 24 13:55:56 CEST 2012
On 24/08/2012 12:48, Jonas Maebe wrote:
>
> Martin wrote on Fri, 24 Aug 2012:
>
>> On 24/08/2012 12:04, Jonas Maebe wrote:
>>>
>>> Martin wrote on Fri, 24 Aug 2012:
>>
>> The above takes the first of the overloaded.
>> All bodies are empty.
>>
>> procedure DebugLn(const s: string = ''); inline; overload;
>
> That looks like a very serious bug introduced in the handling of
> parameters to inlined routines. Florian changed several things there
> over the last couple of months, maybe he has an idea.
If he looks at it, maybe a compiler-switch. It could be treated like in
bool eval, that might omit calls. But obviously not as default.
Anyway, if the behaviour is kept for none function-call params, then it
is a nice addition. (Allows me to to my debugln with empty body)
More information about the fpc-devel
mailing list