public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/98725] Review what is disabled in libstdc++ by --disable-wchar_t
Date: Fri, 08 Oct 2021 23:31:31 +0000	[thread overview]
Message-ID: <bug-98725-4-BJNNZw1SG7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98725-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We could make codecvt<wchar_t, char, mbstate_t> work if we assume that wchar_t
contains UTF-32 or UTF-16 (depending on the size of wchar_t) and reuse the
specializations for char32_t and char16_t. Those specializations are
implemented entirely in libstdc++ with no libc help.

It's unclear (to me) whether --disable-wchar_t is used explicitly to produce a
smaller libstdc++ build, without wchar_t instantiations, or is just used
implicitly on systems where the libc <wchar.h> support is missing. So it's hard
to know whether "emulate wchar_t support in terms of UTF-32" is desirable, or
if that would frustrate users explicitly trying to get a smaller library.

Presumably anybody who wants a smaller library would also want to disable the
codecvt facets for char32_t and char16_t, but nobody has requested that.

I'm not going to spend any more time on it after enabling wide strings and some
type traits.

  parent reply	other threads:[~2021-10-08 23:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18 11:08 [Bug libstdc++/98725] New: " redi at gcc dot gnu.org
2021-01-18 14:23 ` [Bug libstdc++/98725] " cvs-commit at gcc dot gnu.org
2021-01-18 14:24 ` redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org
2021-10-08 12:03 ` redi at gcc dot gnu.org
2021-10-08 14:08 ` redi at gcc dot gnu.org
2021-10-08 14:48 ` redi at gcc dot gnu.org
2021-10-08 14:51 ` cvs-commit at gcc dot gnu.org
2021-10-08 19:12 ` redi at gcc dot gnu.org
2021-10-08 23:31 ` redi at gcc dot gnu.org [this message]
2021-10-09  0:15 ` cvs-commit at gcc dot gnu.org
2021-10-09  0:15 ` cvs-commit at gcc dot gnu.org
2021-10-09  0:15 ` cvs-commit at gcc dot gnu.org
2021-10-09  0:15 ` cvs-commit at gcc dot gnu.org
2021-10-09  0:15 ` cvs-commit at gcc dot gnu.org
2021-10-09  0:15 ` cvs-commit at gcc dot gnu.org
2021-10-09  0:16 ` redi at gcc dot gnu.org
2021-11-24 11:51 ` cvs-commit at gcc dot gnu.org

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=bug-98725-4-BJNNZw1SG7@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).