From patchwork Thu Nov 9 19:25:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 163581 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp694236vqs; Thu, 9 Nov 2023 12:40:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvHF4llMH/Yy4NgyE4VIEbBfYyUTE3q6s65Qumt0WN5h/8VJlAIcCtBlrjba25WdnRwdT+ X-Received: by 2002:a05:622a:1454:b0:41e:3d53:74fc with SMTP id v20-20020a05622a145400b0041e3d5374fcmr6800623qtx.49.1699562408999; Thu, 09 Nov 2023 12:40:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699562408; cv=pass; d=google.com; s=arc-20160816; b=f9dPrYdznSY8ffuJV2MajpW6fSROjGL/9RzLz84bumgW7z4bKeKHBLjwWAFvWgQRKZ yWkayvaoupSbOJxXA/7OvaP4MAk+BJoMXa2Yo94LPbHRMfaS1Ms2Ooa+nfZillHseT1T o5tCkDoOkUcQlx+5fPDi6+P5xQDUUpfSMk9jgJhoq821OImTYjh58f0mQLsNmDD7JvSO iBPEMqoG7EP4IiRIYvOxj+IGhOc64VAOTloC4A8L8Du0tb/4MN26vMQKPbRjL0fRr9sg cwxzsiK67lMdGTo7U4RiAEXcXuVaVoh5afXcLdJxN53nHW55Pb4948ItngcrgtJnmiS2 kzsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=H00zuCB15BMO05w4W/88aKpJrj8/lA+osFrbNUHw1oQ=; fh=pZArBBE5gqcFSMViUIMBC37HN/RJW9xr4RQd+RzEHRs=; b=q9XPn0wUIsXWqd2l4d8mdX18vEWhmSAKxwQ8cuoYggYAWJ8vVg1+zdZvlQvGD4gMwx JHitlvI+Gl3ayNs6VILRZg0mN3fKldnUTckLTvSp9vmMjfT3/AQRhw7lhMm691HIFZb0 2Bio7+Y4YcyEZpcI6GkMJ7+H2LjjqWmUutejCU4Md1/9wEijtxClvT2NdEALLT0/pQNW F9DGQUE7xWfVz7QhzY9B4QkWgTOeoCldj43Quvvne1ytK6PFb/3a4WNZRENhVdWXI2/u f0EBxL/rZFZu2QUi0AndT5yZHRitr1zLPRwn1noQLpF5KqOdI4tsfTi2oP2bzM5x2ED3 D4Sg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@aarsen.me header.s=MBO0001 header.b=q1EDgtdj; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aarsen.me Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id x14-20020a05622a000e00b0041807b58d25si3351224qtw.615.2023.11.09.12.40.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 12:40:08 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@aarsen.me header.s=MBO0001 header.b=q1EDgtdj; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aarsen.me Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5C8F33857028 for ; Thu, 9 Nov 2023 19:32:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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_Arsenovi=C4=87?= To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, =?utf-8?q?Arsen_Arsenovi=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 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782120352636317982 X-GMAIL-MSGID: 1782120352636317982 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.