[fpc-devel] {$INLINE OFF}

Martin lazarus at mfriebe.de
Mon Sep 3 17:13:40 CEST 2012


Does this
1) prevent functions declared in this unit from being inlined (in this 
or other units)
2) functions from other units, that are called in this unit from being 
inlined:

I get 1, but not 2:

program project1;  {$mode objfpc}{$H+}  {$INLINE OFF}
uses Classes, types;

function MyPoint(X, Y: Integer): TPoint;
begin
   Result.x := x;
   Result.y := y;
end;

var  a: TPoint;
begin
   a := Point(1,1);       // inlined
   a := MyPoint(1,1); // not inlined
end.




More information about the fpc-devel mailing list