Hi,

after updating from fpc 3.1 to fpc 3.3, I am getting a lot of "function was not inlined" warnings, e.g. when an inline function depends on a function not declared in the interface part like:

unit inlinetest;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils;


function strContains(const str, searched: string): boolean; inline;

implementation

function strContainsFrom(const str, searched: string; from: SizeInt): boolean;
begin
  result:=Pos(searched, str, from) > 0;
end;


function strContains(const str, searched: string): boolean; inline;
begin
  result := strContainsFrom(str, searched, 1);
end;

end.



Is that supposed to happen?

Fpc 3.1 did not show any warning in this case (although now that I investigate it, fpc 3.1 also did not seem to inline it despite not showing the warning)


Bye,

Benito


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to