Ruby doesn't compile when USE_RINCGC is disabled. It's also not being tested in CI. As @nobu (Nobuyoshi Nakada) has pointed out in comments on the PR, fixing it is simple. This was fixed in this commit
I think we should remove USE_RINCGC entirely and always run with incremental GC enabled, because I don't think this flag is being actively used, and removing it will simplify the code and reduce the cognitive overhead of working with the GC.
I'm for removing many of the untested code paths in gc.c since they may be buggy and are probably not used (like this one, which doesn't even compile so clearly nobody is using it).
Some more context on this ticket. @peterzhu2118 (Peter Zhu) did a gem code search for USE_RINCGC and that returned 4 distinct gems:
Rhodes 7.5.1 - This gem vendors the complete source code of Ruby 2.3.4 inside platform/shared/ruby.
ruby-compiler 0.1.1 - This gem was last released in 2016 and vendored a complete source code of Ruby 2.4. The git repo has since been renamed (to ruby-packer) and has been updated more recently. It still vendors a complete copy of Ruby, but this has been updated to 2.7
ruby_memprofiler_pprof - This uses USE_RINCGC, as a default value to GC_ENABLE_INCREMENTAL_MARK, although I'm not sure what for. This gem will require an update to work with Ruby 3.3 if this patch gets merged as is (/cc @kjtsanaktsidis (KJ Tsanaktsidis) who works on this gem).
zscan 2.0.9 - This gem committed the public header directories include/ruby/internal and include/ruby/backward into it's source code in May 2020. They've not been updated since.
So it looks like the only codebase that is at risk of being impacted by this change is ruby_memprofiler_pprof - all the others are vendoring specific versions of Ruby. So upgrading to future versions for them will be a bigger challenge regardless of this patch.
In any case 1) I'm working (very slowly!) on a different approach to memory profiling now, 2) I completely expect new Ruby versions to break hacks like this, and 3) AFAIK absolutely nobody, myself included, is using this gem.
These kind of flags are provided to measure the impact with on/off the features.
We can simulate them with parameters, but we can not avoid overhead of write barriers completely, for example.
Anyway it was gone.