On Mon, May 9, 2022 at 11:26 AM Florian Weimer <fwei...@redhat.com> wrote:

> On the other hand, that cast is still quite ugly.


Yes, there aren't yet any I/O functions defined for char8_t and therefore
that's the best we can do right now.  I have all kinds of ugly macros to
high these casts.


> All string-related
> functions in the C library currently need it.


Yes, but the cast isn't the issue.  Or more correctly: gcc disregarding the
cast for -Wformat is.

Anyway, I'm not concerned about the non-I/O functions.  This is all C++
code after all and there are functions for all the rest.


> Isn't this a problem with char8_t?
>

 Well, yes, the problem is that gcc seems to just see the u8"" type
(char8_t) even though I tell it with the cast to regard it as a const
char.  Again, I ensure that the encoding matches and putting UTF-8 in char
strings is actually incorrect (in theory).

Reply via email to