On 2/28/22 6:01 PM, Joseph Myers wrote: > On Sun, 27 Feb 2022, Tom Honermann via Libc-alpha wrote: > >> This patch provides implementations for the mbrtoc8 and c8rtomb functions >> adopted for C++20 via WG21 P0482R6 [1] and for C2X via WG14 N2653 [2]. It also >> provides the char8_t typedef adopted for C2X via WG14 N2653 [2]. >> >> The mbrtoc8 and c8rtomb functions are declared in uchar.h in C2X mode or when >> the _GNU_SOURCE macro or C++20 __cpp_char8_t feature test macro is defined. >> >> The char8_t typedef is declared in uchar.h in C2X mode or when the _GNU_SOURCE >> macro is defined and the C++20 __cpp_char8_t feature test macro is not defined >> (if __cpp_char8_t is defined, then char8_t is a builtin type). > You should almost never have "defined __USE_GNU || ..." in header > conditionals, because _GNU_SOURCE implies the other feature test macros. Ah, right. Thank you, a corrected patch is attached. Tom.