Okay, it's definitely broken. GCC 14.2.0 and some other versions all crash out when using the MacOS SDK as its base SDK. But it's not GCC's fault: MacOS is failing to properly define rsize_t for GCC on top of its SDK, which is causing an error no matter how any of the things are defined.
Not sure if GCC or MacOS SDK should fix it. Probably GCC, given how impenetrable MacOS is.