From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by sourceware.org (Postfix) with ESMTPS id 9BB993858D1E; Thu, 9 Nov 2023 19:32:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BB993858D1E Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9BB993858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2050:0:465::201 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699558334; cv=none; b=jPHYEBzvmQ3G5ZBZmEd9ii2bASLTtIL+Yj3mnaIQ6FSX256tTcY91Mtoc3M3wBvTrqczr2csShSvzHT9MlVGggiX4KmzKRc9vQivxMH6yH377kn78/XQSy+jGOs/AQPDjG4NEcPHsBXPonJtb9rbSn0Mts3gqTz4g8w9MTi4puo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699558334; c=relaxed/simple; bh=M8fztGLqU8HM1AEUVY6HP0SvLYzjDFIigoGGfwmgmjA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Q7PlORTmb6mfu/tCa0xJnJj0t2Gxj40Ja0/a5kvlSUN2tD5pK5oR4aSL1d/Zb4+6KWdHGTYFaC+gye7neIKsWlD0hRYxf3O3X5HjUSyjt79mF+XseVVmeDFEt4WXHrz7MH3XoywxLf/IfHZqVY5QJrHgfVwV3K9cDVoE6axF60M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4SRBt13tKRz9sp7; Thu, 9 Nov 2023 20:32:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1699558329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=H00zuCB15BMO05w4W/88aKpJrj8/lA+osFrbNUHw1oQ=; b=q1EDgtdjXd2IsCPJ1rz6bXUJpt88IMPq2Qn3ZjjGVPh6k9b8C7C+Rv50oiYZndEB2jLMTG h3owNPvKPov7BNG5vqXWlrBvuHWoJc9FthYd1MmJWH/pxdv44x7HMy6QRyuc/+M9dGYCP1 mN0qh2m49y7SrI5wbCUu4p+iAg8xGuPWOrkUjBcsFUDpvK7hkSpccU6/qdY7+74waD0Qvl 9Yjs+Dpepzv1eVyED3CQd5aLWpNvpPx+m+MYCN1Q9oJQKdGBMuRqN6AyqqxIdeAiiXNn6B wV6A6XLKut8FusSlJ7PzGhrhNIpTkZUffzhnVhv7qU/xzqgcyCXxek8sGwf2lQ== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Subject: [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension Date: Thu, 9 Nov 2023 20:25:34 +0100 Message-ID: <20231109193009.2391070-1-arsen@aarsen.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This allows us to add features to freestanding which allow specifying non-default allocators (generators, collections, ...) without having to modify them. libstdc++-v3/ChangeLog: * include/bits/memoryfwd.h: Remove HOSTED check around allocator and its specializations. --- Evening, This patch adds std::allocator as a declaration to freestanding, so that it doesn't block various other bits of the library (such as collections or the generators that I intend to send in soon) from being added to freestanding anymore. I don't intend to pull in anything but into freestanding in this release, though, so, this patch will have little impact for now. Testing on x86_64-pc-linux-gnu (the tests are not done yet, but I see no relevant fails in previous test runs). The follow-up patch also marks a new test as freestanding (as it was failing). OK for trunk? Have a lovely evening! libstdc++-v3/include/bits/memoryfwd.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/memoryfwd.h b/libstdc++-v3/include/bits/memoryfwd.h index 330a6df7f44a..2b79cd8880a1 100644 --- a/libstdc++-v3/include/bits/memoryfwd.h +++ b/libstdc++-v3/include/bits/memoryfwd.h @@ -60,13 +60,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @{ */ -#if _GLIBCXX_HOSTED + // Included in freestanding as a libstdc++ extension. template class allocator; template<> class allocator; -#endif #if __cplusplus >= 201103L /// Declare uses_allocator so it can be specialized in `` etc. -- 2.42.1