Trivial function not inlined; gdeque library unit causes notices in user code
Original Reporter info from Mantis: pgimeno
-
Reporter name: Pedro Gimeno
Original Reporter info from Mantis: pgimeno
- Reporter name: Pedro Gimeno
Description:
Unit gdeque contains this function (in line 68 as of this writing):
function TDeque.Size():SizeUInt;inline; begin Size:=FDataSize; end;
That's a trivial function that the compiler should have no trouble inlining. However, when writing a program that uses it, the compiler says:
'Note: Call to subroutine "function TDeque&LtPos;System.SmallInt>.Size:QWord;" marked as inline is not inlined'
If the fact that it is not inlined is not a bug, then the problem is that these messages add noise to the notice/warning/error list, and I'd appreciate if gdeque is adjusted to prevent generating this message.
Steps to reproduce:
To reproduce, just compile (not run) this test case:
uses gdeque; var x: specialize TDeque&LtPos;Integer> = nil; begin x.Items[0] := 3; end.
It spews these three lines:
gdeque.pp(129,21) Note: Call to subroutine "function TDeque&LtPos;System.SmallInt>.Size:QWord;" marked as inline is not inlined
gdeque.pp(135,21) Note: Call to subroutine "function TDeque&LtPos;System.SmallInt>.Size:QWord;" marked as inline is not inlined
gdeque.pp(141,21) Note: Call to subroutine "function TDeque&LtPos;System.SmallInt>.Size:QWord;" marked as inline is not inlined
Mantis conversion info:
- Mantis ID: 37890
- OS: Linux
- Build: 47056
- Version: 3.3.1