Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2020-06

29527 notes with just 6 lines of code ;-)

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

Hi,

I stumbled upon this by accident.

(Fpc trunk r45606, 32-bit on Win10-64)

I managed to have the compiler issue 29527 identical notes for a single soucefile that consists of just 6 lines:

===========
function FileSize(S: STring): Int64; inline;
begin
  FileSize := FileSize(S); //obviously a mistake in the code, but nevertheless
end;
begin
end.
===========

This will make the compiler output 29527 times this: test.pas(3,15) Note: Call to subroutine "function
FileSize(S:ShortString):Int64;" marked as inline is not inlined

It looks like the compiler itself recurses the definition of FileSize() ?

Bart

Reply by email