Coincidentally, just a few days ago, I tried to run Nim[0] on Windows XP as an experiment.
And to my surprise, the latest 32-bit release of Nim simply works out the box. But Nim compiles to C, so I also needed C compiler. Many versions of mingw I could find online - they all failed to launch.
After some time I managed to find very old Mingw (gcc 4.7.1) that have finally worked [1].
I found out the other day you can use modern clang-cl with the MSVC6 headers and it just works. you can download them from here https://github.com/itsmattkc/MSVC600 or just copy it from an install if you have one handy.
I'm guessing this no longer qualifies as "modern," since the last update was in 2018 and is no longer in active development, but I'd like to say that the 32bit version of the Tiny C Compiler by Fabrice Bellard works on Windows 98 SE.
[1] https://github.com/skeeto/w64devkit