Fix FPC compilation of uPSRuntime#313
Open
TetzkatLipHoka wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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