From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 67169381D4E5; Fri, 16 Sep 2022 22:33:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 67169381D4E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663367595; bh=TlXcxSxIlnM5gFunusYBk5N4j/Inv9fcJjGpppx+C20=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YN8RbsLky/fopF23piy4lWPKqUIvlK1yH9R1LmoMmjn/JxXoHD9D2szREuGl0mOUE s4s6xkyYeXzEpnhxEb4qlN62aMELTgafpa0v0eFrgFjPuorviPROYv7/HB33wZT6/g WAHI55p2Jv4qnhGuvxwX+JtGpheZ67/w5mLp9VHE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/106953] C++23 add new headers for freestanding Date: Fri, 16 Sep 2022 22:33:14 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106953 --- Comment #2 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:cf0fded5d837bad590eb091d8a3dc4898872560f commit r13-2705-gcf0fded5d837bad590eb091d8a3dc4898872560f Author: Jonathan Wakely Date: Thu Sep 15 21:02:32 2022 +0100 libstdc++: Add preprocessor conditions for freestanding [PR106953] This adds checks for _GLIBCXX_HOSTED to a number of headers which are not currently installed for freestanding, but need to be for P1642R11 support. For example, needs to be installed for C++23 freestanding mode, but without stream iterators and streambuf iterators. Similarly, needs to be installed, but without std::allocator and std::shared_ptr. This change disables the non-freestanding parts of those headers. libstdc++-v3/ChangeLog: PR libstdc++/106953 * include/backward/auto_ptr.h [!_GLIBCXX_HOSTED]: Do not define shared_ptr members. * include/bits/alloc_traits.h [!_GLIBCXX_HOSTED]: Do not declare std::allocator_traits> specializations for freestanding. * include/bits/memoryfwd.h [!_GLIBCXX_HOSTED] (allocator): Do not declare for freestanding. * include/bits/stl_algo.h [!_GLIBCXX_HOSTED] (stable_partition): Do not define for freestanding. [!_GLIBCXX_HOSTED] (merge, stable_sort): Do not use temporary buffers for freestanding. * include/bits/stl_algobase.h [!_GLIBCXX_HOSTED]: Do not declare streambuf iterators and overloaded algorithms using them. * include/bits/stl_uninitialized.h [!_GLIBCXX_HOSTED]: Do not define specialized overloads for std::allocator. * include/bits/unique_ptr.h [!_GLIBCXX_HOSTED] (make_unique) (make_unique_for_overwrite, operator<<): Do not define for freestanding. * include/c_global/cstdlib [!_GLIBCXX_HOSTED] (_Exit): Declare. Use _GLIBCXX_NOTHROW instead of throw(). * include/debug/assertions.h [!_GLIBCXX_HOSTED]: Ignore _GLIBCXX_DEBUG for freestanding. * include/debug/debug.h [!_GLIBCXX_DEBUG]: Likewise. * include/std/bit [!_GLIBCXX_HOSTED]: Do not use the custom __int_traits if is available. * include/std/functional [!_GLIBCXX_HOSTED]: Do not include headers that aren't valid for freestanding. (boyer_moore_searcher, boyer_moore_horspool_searcher): Do not define for freestanding. * include/std/iterator [!_GLIBCXX_HOSTED]: Do not include headers that aren't valid for freestanding. * include/std/memory [!_GLIBCXX_HOSTED]: Likewise. * include/std/ranges [!_GLIBCXX_HOSTED] (istream_view): Do not define for freestanding. (views::__detail::__is_basic_string_view) [!_GLIBCXX_HOSTED]: Do not define partial specialization for freestanding.=