https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103305

--- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #17)
> 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>:

Or this, to limit it to just C++:


--- a/newlib/libc/include/ctype.h
+++ b/newlib/libc/include/ctype.h
@@ -181,6 +181,13 @@ __locale_ctype_ptr_l(locale_t _l)

 #endif /* !__cplusplus */

+#if defined(__GNUC__) && defined(__cplusplus)
+# if __GNUC__ < 12
+/* Libstdc++ uses _U, _L etc. */
+#  include <ctype_.h>
+# endif
+#endif
+
 _END_STD_C

 #endif /* _CTYPE_H_ */

Reply via email to