From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1DA1D385840C; Fri, 8 Oct 2021 23:31:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DA1D385840C From: "redi at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2021 23:31:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98725 --- Comment #7 from Jonathan Wakely --- We could make codecvt work if we assume that wcha= r_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 produc= e a smaller libstdc++ build, without wchar_t instantiations, or is just used implicitly on systems where the libc 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 t= he 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.=