[PATCH v4 2/3] stdlib: Implement mbrtoc8(), c8rtomb(), and the char8_t typedef.
Tom Honermann
tom@honermann.net
Wed Jul 20 16:53:45 GMT 2022
On 7/20/22 11:05 AM, Florian Weimer wrote:
> * Adhemerval Zanella Netto:
>
>>> I think __cpp_char8_t is only defined if the language mode is active.
>>> The warning is independent of the language mode, though.
>> Maybe we also skip chat8_t definition for __cplusplus == 202002L ?
> We have to do that in any case, but we still need to deal with the
> warning in the earlier language modes.
Declaring the char8_t typedef (and related mbrtoc8 and c8rtomb
functions) in C++ modes that don't enable the builtin char8_t type
(including -std=c++20 -fno-char8_t) is beneficial for compatibility with
C in C23 or _GNU_SOURCE modes.
Tom.
>
> Thanks,
> Florian
>
More information about the Libc-alpha
mailing list