From patchwork Tue Jun 6 12:23:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 103773 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3353550vqr; Tue, 6 Jun 2023 05:24:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5eUM1ncqjDMnSl0EE4WdFMscQCpU+ozPuTC83Eahx/30H68VOXiGCFrZSo3dhUj9Xq7SB+ X-Received: by 2002:a17:907:940d:b0:96f:608c:5bdf with SMTP id dk13-20020a170907940d00b0096f608c5bdfmr1812826ejc.64.1686054288077; Tue, 06 Jun 2023 05:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686054288; cv=none; d=google.com; s=arc-20160816; b=XFiOWnT9iK2p1sO5wb7SOoc1AMsMIZ4y/aJhk0RasREMnsXp+kb8XFnn/2YWSRSIdC 7MsBVLk2ARtH6f0NwyFXzexxMH1U/BmQ+SKwM7Ayu0K5fTxKhP5hwXbuaDlw0dmBkLGr SOx/4lKLDnrFx0hFXi6Oq+tpsAEOkL3GGKmcB08vdmRbmwk+oGweLWs/cRatOzLcO4RQ PZPCaHLE33ze7V8ZROl55a/zQU5b5LAf0Ctpm9mQBnZC10nmishpE7qqF+cRZ7zGsoTf /5SAaUOc0O4nYykQC128MrL7GdmgcmugI3y51unLcgI2YzSBF4ssCLMkBZe3VASSERWH /Njw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:organization:message-id:date :subject:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=R94iY2wK7U+FIHKCpQfQ9FdUgmzdxov9y/lUtaF87UA=; b=LimxDqKh62MpnZ+qWG+6UKwKxNalFeixotuAjtqs1pj3g4M//AjJ8Zu7CaMA/Mo8zz xl9vyjfR7UHNPF7f1BZuULYOUpxdtVH2POjaZ7r2d1B8KLT15bSegFhAufUbL4dGqddF 4vTg71IomVIjrwwlkRcEtHmLiRSZkpgGzbJv5uYevYs+1CpbiorM8fM/Ydi6JT3GntQZ GktybXKLb97/ZvKaXWrPVXoIXtpvm6sIjlbtW+dRNdiYGBw0DF/MLhFpCI+cSRXj6YhT CKVZFj/JqiMrk4jfkZZP92HxmtJFd12x91h9SXl85CnO6/IGmqmvIqcNfOXlFRQcUXaS ZI9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=K0ID8mkE; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id b18-20020a170906729200b009745eb6cf86si5815068ejl.895.2023.06.06.05.24.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 05:24:48 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=K0ID8mkE; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 194D7385782B for ; Tue, 6 Jun 2023 12:24:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 194D7385782B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686054267; bh=R94iY2wK7U+FIHKCpQfQ9FdUgmzdxov9y/lUtaF87UA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=K0ID8mkE+zgNS0kANORGTC2FG1kTxFpp4nbzOywRT6OYJEqhEivpRCHVq9bMT70Fj 4zBJFKepdJ5qVg1z4h3G+uVaZC6asOxiBkjAQQ5pCNhTI7KiYU/KRTZkYFH5Wrolu0 8Rb0eigKfqMBllXPsgEmuo9rkJOS6PW5cJTH83yI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout1.gsi.de (lxmtout1.gsi.de [140.181.3.111]) by sourceware.org (Postfix) with ESMTPS id C445F3858D33; Tue, 6 Jun 2023 12:23:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C445F3858D33 Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id C8D152051048; Tue, 6 Jun 2023 14:23:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at lxmtout1.gsi.de Received: from lxmtout1.gsi.de ([127.0.0.1]) by localhost (lxmtout1.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id v0yHLWkkwbM5; Tue, 6 Jun 2023 14:23:38 +0200 (CEST) Received: from srvEX6.campus.gsi.de (unknown [10.10.4.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lxmtout1.gsi.de (Postfix) with ESMTPS id AFFF82051040; Tue, 6 Jun 2023 14:23:38 +0200 (CEST) Received: from minbar.localnet (140.181.3.12) by srvEX6.campus.gsi.de (10.10.4.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 6 Jun 2023 14:23:38 +0200 To: , Subject: [committed] libstdc++: Protect against macros Date: Tue, 6 Jun 2023 14:23:37 +0200 Message-ID: <5732205.e9J7NaK4W3@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvEX6.Campus.gsi.de (10.10.4.96) To srvEX6.campus.gsi.de (10.10.4.96) X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Matthias Kretz via Gcc-patches From: Matthias Kretz Reply-To: Matthias Kretz Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767956061141765878?= X-GMAIL-MSGID: =?utf-8?q?1767956061141765878?= pushed to trunk, will backport later tested on x86_64-pc-linux-gnu ------- >8 -------- Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h (__bit_cast): Use __gnu__::__vector_size__ instead of gnu::vector_size. --- libstdc++-v3/include/experimental/bits/simd.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de stdₓ::simd ────────────────────────────────────────────────────────────────────────── diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index 834fe923065..90523ea57dc 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -1743,18 +1743,18 @@ __bit_cast(const _From __x) return reinterpret_cast<_To>(__x); else if constexpr (__is_vector_type_v<_To> && __from_is_vectorizable) { - using _FV [[gnu::vector_size(sizeof(_From))]] = _From; + using _FV [[__gnu__::__vector_size__(sizeof(_From))]] = _From; return reinterpret_cast<_To>(_FV{__x}); } else if constexpr (__to_is_vectorizable && __from_is_vectorizable) { - using _TV [[gnu::vector_size(sizeof(_To))]] = _To; - using _FV [[gnu::vector_size(sizeof(_From))]] = _From; + using _TV [[__gnu__::__vector_size__(sizeof(_To))]] = _To; + using _FV [[__gnu__::__vector_size__(sizeof(_From))]] = _From; return reinterpret_cast<_TV>(_FV{__x})[0]; } else if constexpr (__to_is_vectorizable && __is_vector_type_v<_From>) { - using _TV [[gnu::vector_size(sizeof(_To))]] = _To; + using _TV [[__gnu__::__vector_size__(sizeof(_To))]] = _To; return reinterpret_cast<_TV>(__x)[0]; } else