[fpc-devel] Does FPC optimize unused parameters ?
jonas.maebe at elis.ugent.be
Fri Aug 24 13:04:23 CEST 2012
Martin wrote on Fri, 24 Aug 2012:
> On 08/08/2012 15:37, Jonas Maebe wrote:
>> Martin wrote on Wed, 08 Aug 2012:
>>> Out of curiosity. Is there an optimization like this
>> [removing calculation/load of unused parameters]
> Are you sure? It seems the compiler disagrees with you.
> I tested with 2.7.1 (updated yesterday):
> function Foo(s:string): string;
> Result := s;
> Form1.Caption := s;
> procedure TForm1.FormCreate(Sender: TObject);
> The assembler for FormCreate (no optimization used). It even omits
> the call to "Foo"...
How is debugln defined?
More information about the fpc-devel