
Issue #21286 has been updated by MSP-Greg (Greg L). @alanwu Thanks for working on this.
it passed CI with -std=c23 on GCC 14
I'm not that familiar with gcc, especially in terms of issues like this. Are you pretty certain that `-std=c23 on GCC 14` is the same as `GCC 15`? I can check that locally...
Is there a way to explicitly pick GCC 15 on CI with setup-ruby?
At present, no. One could use `setup-ruby-pkgs`, let me try that with your PR. Going forward, I see a need to be able to use GCC 14 with older Rubies, and GCC 15 with newer ones. The selection should be automatic, but along with it, an override would be helpful, especially for building Ruby. An override example would be a base Ruby that was UCRT (loaded with setup-ruby), but the script was building an MSWIN Ruby. Having the override would elimination a chicken/egg problem that often exists. Some background: The code that creates 7z packages of build tools (stored in a release) is contained in `ruby/setup-msys2-gcc`. The code in `setup-ruby` downloads and extracts the correct 7z files based on the Ruby version (no functioning override yet). At present, there are two 'vectors' of build tool selections, [ucrt, mingw] and [OpenSSL 1.1, OpenSSL 3.y], which creates four different build tool packages. Now, I need another for GCC version [14, 15]. We're also adding arm64 packages. I'll move forward with creating packages accounting for GCC 14 and GCC 15. ---------------------------------------- Bug #21286: Windows - MSYS2 just updated to GCC 15.1.0, builds failing https://bugs.ruby-lang.org/issues/21286#change-112830 * Author: MSP-Greg (Greg L) * Status: Open * ruby -v: master * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- MSYS2 just updated to GCC 15.1.0, and the ruby-loco builds failed to compile. See [MinGW](https://github.com/MSP-Greg/ruby-loco/actions/runs/14693708990/job/412325097...) & [UCRT](https://github.com/MSP-Greg/ruby-loco/actions/runs/14693775816/job/412326620...) Also, I compiled mswin locally with the recent VS 'preview' release, and the bug has been fixed. -- https://bugs.ruby-lang.org/