Free Pascal 3.2.2 could not compile uPSRuntime.pas:
- Inc()/Dec() on a Variant is a Delphi extension; FPC rejects it
('Operator is not overloaded'). Use := Variant +/- 1 instead, which is
semantically identical and compiles on both.
- ResultAsRegister was recently added to the interface section, but its
implementation sits inside the {$else} region of empty_methods_handler.
FPC on cpu64/arm/powerpc defines empty_methods_handler, so the whole
region - including the implementation - disappeared and the unit failed
with 'Forward declaration not solved'. Move the implementation in front
of the region; it is plain Pascal with no dependency on the handlers.
Repro: fpc 3.2.2 x86_64-linux fails on master with 4 errors + 1 fatal;
with this change all uPS* core units compile and a script compile/run
smoke test passes on Linux. No change for Delphi (verified DCC32/DCC64).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Free Pascal 3.2.2 could not compile uPSRuntime.pas:
('Operator is not overloaded'). Use := Variant +/- 1 instead, which is
semantically identical and compiles on both.
implementation sits inside the {$else} region of empty_methods_handler.
FPC on cpu64/arm/powerpc defines empty_methods_handler, so the whole
region - including the implementation - disappeared and the unit failed
with 'Forward declaration not solved'. Move the implementation in front
of the region; it is plain Pascal with no dependency on the handlers.
Repro: fpc 3.2.2 x86_64-linux fails on master with 4 errors + 1 fatal;
with this change all uPS* core units compile and a script compile/run
smoke test passes on Linux. No change for Delphi (verified DCC32/DCC64).
🤖 Generated with Claude Code