From patchwork Thu Jun 23 21:21:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitar Dimitrov X-Patchwork-Id: 55348 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 95E7638618D7 for ; Thu, 23 Jun 2022 21:23:35 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id 105D1384F01E for ; Thu, 23 Jun 2022 21:21:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 105D1384F01E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinux.eu DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZmNUKbOc5ONGVVUEWHPcMWL+hgJtJ1rlZG29OBtHUQc=; b=fC3OKYW5SmEldSP3/Bde1BjfVS ju2VQsaJjJKG9HAb3vBIcL/SlAgCuhko0jpFzIPyHe80wE+JxCIXMpghKlLyrspbNhcxvX8LWkrDl +iLS9bmE9+GIcKHWxicx2+CmwB5YwLT57qeiGZKXjCdEFDyjjuv2aQZb9w3O5IiRdKmXkmnAqA3so JDEhB/YrIUvlct2tw0yuTtQd8ad2UcEyPtjD15r12XzhrXK/Lcr7MZ75EkvDl2TkVH6Z/yGCs/26b 805kWfK6HTcLpZhPK3xaEoTtbPJ+exWa2v4vm+WflPV6PPrTFxzRJTma6uvBG9tDNQDxAt70I6LIB rgPv6d/g==; Received: from [95.87.234.74] (port=58608 helo=kendros.lan) by server28.superhosting.bg with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o4UGo-0000wH-J9; Fri, 24 Jun 2022 00:21:48 +0300 From: Dimitar Dimitrov To: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Rename test-defined macros Date: Fri, 24 Jun 2022 00:21:21 +0300 Message-Id: <20220623212123.149019-4-dimitar@dinux.eu> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server28.superhosting.bg X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dinux.eu X-Get-Message-Sender-Via: server28.superhosting.bg: authenticated_id: dimitar@dinux.eu X-Authenticated-Sender: server28.superhosting.bg: dimitar@dinux.eu X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Epiphany, PRU, ARC and NDS32 may predefine __big_endian__ and __little_endian__ macros. This leads to spurious warnings like: gcc.dg/sso/memcpy-1.c:7: warning: "__little_endian__" redefined Fix by renaming the macros in the test. Ok for trunk? gcc/testsuite/ChangeLog: * gcc.dg/sso/memcpy-1.c (__big_endian__, __little_endian__): Rename macros to avoid conflicts with predefined ones. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/sso/memcpy-1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.dg/sso/memcpy-1.c b/gcc/testsuite/gcc.dg/sso/memcpy-1.c index b4e1c8786d9..0dea955cbaf 100644 --- a/gcc/testsuite/gcc.dg/sso/memcpy-1.c +++ b/gcc/testsuite/gcc.dg/sso/memcpy-1.c @@ -3,20 +3,20 @@ typedef unsigned char uint8_t; typedef unsigned int uint32_t; -#define __big_endian__ scalar_storage_order("big-endian") -#define __little_endian__ scalar_storage_order("little-endian") +#define __big_endian_attr__ scalar_storage_order("big-endian") +#define __little_endian_attr__ scalar_storage_order("little-endian") typedef union { uint32_t val; uint8_t v[4]; -} __attribute__((__big_endian__)) upal_u32be_t; +} __attribute__((__big_endian_attr__)) upal_u32be_t; typedef union { uint32_t val; uint8_t v[4]; -} __attribute__((__little_endian__)) upal_u32le_t; +} __attribute__((__little_endian_attr__)) upal_u32le_t; static inline uint32_t native_to_big_endian(uint32_t t) {