Am Sa., 29. Dez. 2018, 15:23 hat Benito van der Zander <ben...@benibela.de> geschrieben:
> 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) > Correct. FPC 3.1.1 did neither warn nor inline in this case, 3.3.1 at least warns (I think 3.2 already warns as well). Regards, Sven >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal