https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
--- Comment #14 from anlauf at gcc dot gnu.org --- (In reply to Thomas Koenig from comment #13) > (In reply to anlauf from comment #12) > > > Any reason not to use the macros from safe-ctype.h? > > Can we actually use it? This is part of libiberty, AFAIK, > and I am not sure that we link libgfortran against it. Right. I didn't actually check. So instead of using safe-ctype.h's #define TOUPPER(c) _sch_toupper[(c) & 0xff] we could do #define TOUPPER(c) toupper ((c) & 0xff) which might solve the signedness issue as well as out-of-bounds accesses. Keeps line length unchanged. Unless I am missing something else again...