From: Ulrich Drepper <drepper@redhat.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Ulrich Drepper via Gcc <gcc@gcc.gnu.org>
Subject: Re: -Wformat and u8""
Date: Mon, 9 May 2022 12:04:50 +0200 [thread overview]
Message-ID: <CAP3s5k9zSqrj6kQ0hKDb9q+hquScvgBJk-hQU=7Pc6ouYX5kiw@mail.gmail.com> (raw)
In-Reply-To: <87wnevcb0f.fsf@oldenburg.str.redhat.com>
On Mon, May 9, 2022 at 11:26 AM Florian Weimer <fweimer@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).
next prev parent reply other threads:[~2022-05-09 10:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 9:15 Ulrich Drepper
2022-05-09 9:26 ` Florian Weimer
2022-05-09 10:04 ` Ulrich Drepper [this message]
2022-05-09 10:07 ` Andreas Schwab
2022-05-10 13:27 ` Jonathan Wakely
2022-05-10 17:48 ` Tom Honermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP3s5k9zSqrj6kQ0hKDb9q+hquScvgBJk-hQU=7Pc6ouYX5kiw@mail.gmail.com' \
--to=drepper@redhat.com \
--cc=fweimer@redhat.com \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).