macros compilation error message should dump all macro call stack
Original Reporter info from Mantis: ajax16384
-
Reporter name:
Original Reporter info from Mantis: ajax16384
- Reporter name:
Description:
Compilation error message about code that uses macros shows only macro definition position. I guess fpc should dump all macro evaluation stack (all fault macro calling lines).
Steps to reproduce:
program TestMacro;
{$MACRO ON}
{$define SubstFoo:=RealFoo}
procedure RealFoo(v: Int64); overload;
begin
end;
procedure RealFoo(v: Integer); overload;
begin
end;
var
u: UInt64;
i: Integer;
begin
SubstFoo(u); // 14 line
SubstFoo(i);
RealFoo(u); // 16 line
RealFoo(i);
end.
fpc error output:
TestMacro.dpr(3,8) Error: Can't determine which overloaded function to call
TestMacro.dpr(16,3) Error: Can't determine which overloaded function to call
TestMacro.dpr(18,4) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
"TestMacro.dpr(3,8)" points only to macro definition line, but not to real macro calling location.
Expected error message should looks like:
TestMacro.dpr(14,3); TestMacro.dpr(3,8) Error: Can't determine which overloaded function to call
Mantis conversion info:
- Mantis ID: 25410
- Version: 2.6.2