Recent

Author Topic: FPC Trunk a bit long code compilation compared to 3.2.2 and many, many Hints  (Read 682 times)

ALLIGATOR

  • New Member
  • *
  • Posts: 25
Code: Pascal  [Select][+][-]
  1. program test;
  2.  
  3. type
  4.   TSimpleAllocator = class
  5.     function GetMem(Size: SizeUInt): Pointer; inline;
  6.   end;
  7.  
  8. function TSimpleAllocator.GetMem(Size: SizeUInt): Pointer;
  9. begin
  10.   Result:=GetMem(Size);
  11. end;
  12.  
  13. begin
  14.   TSimpleAllocator.Create.GetMem(0);
  15. end.
  16.  

FPC Trunk 770 hints:
770 * Note: Call to subroutine "function TSimpleAllocator.GetMem(Size:QWord):System.Pointer;" marked as inline is not inlined

FPC 3.2.2: No hints


The question is not about the correctness of the code, I know there is recursion here, I just wonder why the compiler tries 770 times to inline, maybe it is a logical error in the compiler that can be fixed
« Last Edit: November 23, 2024, 10:02:29 am by ALLIGATOR »

 

TinyPortal © 2005-2018