GCC / Clang header clash on macOS
GCC on macOS including Homebrew-installed depends on the macOS SDK. When the macOS SDK is updated, the system headers may become incompatible with GCC versions < 13.3. Specifically, there can be syntax changes requiring C23 but that GCC < 13.3 could not handle.
Homebrew GCC 14.1 and newer work just fine, so the solution is to update GCC.