Fix the GCC 12 Release build for Windows-to-POSIX path translation #23

Open
github-bot wants to merge 1 commit from github-bot/gh-23 into main AGit
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 19:13 UTC · original
RavenCurseBurg:fix/gcc12-root-mount → main · +7 −7 · 2 files · 1 commits · open

On Debian 12 with GCC 12.2, the Release build with warnings as errors fails in windows_to_posix. GCC emits -Wrestrict when the function strips the slash from a root mount and assigns "/" back to the empty string. Build log on main

DriveMap::with_mappings already removes trailing separators and keeps the POSIX root as "/". The translator can use that stored mount directly. The added test maps drive R to /// and checks that its drive root becomes /.

Debian 12 (GCC 12.2) and Fedora 44 (GCC 16.2) now pass all three CTests with Release optimization and the existing warning flags. A Windows x64 MinGW GCC 15.2 Release build also passed all three. I compared 700 CLI translations across five mount configurations on Windows. All outputs matched main byte for byte. Debian and Fedora verification

AI-assisted with Codex + GPT-6.2 Astra (xhigh).

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 19:13 UTC · [original](https://github.com/JamesCicada/GTAVI-Recomp/pull/23) `RavenCurseBurg:fix/gcc12-root-mount` → `main` · +7 −7 · 2 files · 1 commits · open On Debian 12 with GCC 12.2, the Release build with warnings as errors fails in `windows_to_posix`. GCC emits `-Wrestrict` when the function strips the slash from a root mount and assigns `"/"` back to the empty string. [Build log on main](https://github.com/RavenCurseBurg/GTAVI-Recomp/actions/runs/45682253471/job/139445565266) `DriveMap::with_mappings` already removes trailing separators and keeps the POSIX root as `"/"`. The translator can use that stored mount directly. The added test maps drive R to `///` and checks that its drive root becomes `/`. Debian 12 (GCC 12.2) and Fedora 44 (GCC 16.2) now pass all three CTests with Release optimization and the existing warning flags. A Windows x64 MinGW GCC 15.2 Release build also passed all three. I compared 700 CLI translations across five mount configurations on Windows. All outputs matched main byte for byte. [Debian and Fedora verification](https://github.com/RavenCurseBurg/GTAVI-Recomp/actions/runs/45682837847) AI-assisted with Codex + GPT-6.2 Astra (xhigh).
DriveMap already strips trailing separators but preserves the POSIX root. Removing the repeated trim and empty-string assignment also restores Release builds with GCC 12 and warnings as errors.

AI-assisted with Codex + GPT-6.2 Astra (xhigh).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:44:36 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/23/head:github-bot/gh-23'
git switch 'github-bot/gh-23'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-23'
git switch 'github-bot/gh-23'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-23'
git switch 'github-bot/gh-23'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-23'
git switch 'main'
git merge --squash 'github-bot/gh-23'
git switch 'main'
git merge --ff-only 'github-bot/gh-23'
git switch 'main'
git merge 'github-bot/gh-23'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.