https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103305
--- Comment #17 from Jonathan Wakely <redi at gcc dot gnu.org> --- The sim code should be fixed, period. It currently has undefined behaviour. If the newlib change is still desirable, it would be nice if it was conditional on the __GNUC__ version, so old versions of GCC can still be built. Maybe just do this in <ctype.h>: #if __GNUC__ < 12 #include <ctype_.h> #endif So the old macros are still defined.