From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 0A977384D177 for ; Thu, 20 Oct 2022 18:26:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A977384D177 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x42d.google.com with SMTP id i3so323112pfk.9 for ; Thu, 20 Oct 2022 11:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AzKiTuwPPDTQy6GoFdXoOtnoSxNA70w3l4LAsQGNAyM=; b=R5eUTzJa9wJAjokpQVvBq23lap8bDIOxbtp0RcmSORAxhUdMTJrrSUoKLOQYx4wRvz hGnCnDzheNpJjy4I9wQX9GyIDnwQQ7QfDjpMSKsmpbWsX0B3ugixSLJAbtWDOallNbFB PNkLxcsho/oTlfXtQIexx776L/crhSn6hXXZxvT6XyYOWTg3coJPtybPfAFJPbfKh7Ks elPaHyqHDgfRDAM+/6Pv9il/9IP2Dgv0wpC6d+zMGlbkhkowPat6vTsK04hTxBg4bHwO RJfFGNt/1t08wqF/S5GUXPVF6ifhDwPkXx/ZTMscVWyncVhu6i+coVeqcOmtdnz/hcsA k+ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AzKiTuwPPDTQy6GoFdXoOtnoSxNA70w3l4LAsQGNAyM=; b=N2om+OiioWPWZ0blXGOlI3Rxjqy8u7jRFCKmMEnlhvdzNBrbrcrE2fdSZpjEO8Gr1c vaGFdTOGdBZwqzYWiuGcpLxc57xYC9cB28f8Num2brwq36IiIcxgKncb60E3VMbnSgO2 mhw0eqexYkZT8NIndPrFPSWQw46kUVwvggUGz02twUAE67fEFHTqTZcfaJgRElxoeLnc DPopRULbBXVb6BaBjlxwYT/73m+GaLdoTgT5D2pHLINfvUIERlc52tH2M079SSWGa1XR roGEMbrkm1ubrh2plraM7rwTVUAIyb3ViwVxNkl/4MOvvoEiBka85UmynU4rAleyNQ+i GXeg== X-Gm-Message-State: ACrzQf1WfI9w8eIG6Q1ghIdR8+CHGNnAnwH5I/xhLfO55w0kQI5BcqBq JTdYR/39G56aAgx/SQBX0V53e+B1+SPQBQ== X-Google-Smtp-Source: AMsMyM7EDnzo3rG6mmqKhGe3voRyz+IeEqvSbTkeYglvjbBTHOOXphu9bZaEoJ6Va9L/IOB/I/k4+Q== X-Received: by 2002:a63:ed0a:0:b0:442:2514:95f5 with SMTP id d10-20020a63ed0a000000b00442251495f5mr13002509pgi.402.1666290410289; Thu, 20 Oct 2022 11:26:50 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id w15-20020a17090a460f00b00202fbd9c21dsm115067pjg.48.2022.10.20.11.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:26:49 -0700 (PDT) From: Yonggang Luo To: elfutils-devel@sourceware.org Cc: Yonggang Luo Subject: [PATCH 13/25] libdw: typeof -> __typeof that can be recognized by both clang-cl and gcc Date: Fri, 21 Oct 2022 02:25:52 +0800 Message-Id: <20221020182603.815-14-luoyonggang@gmail.com> X-Mailer: git-send-email 2.36.1.windows.1 In-Reply-To: <20221020182603.815-1-luoyonggang@gmail.com> References: <20221020182603.815-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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: Signed-off-by: Yonggang Luo --- libdw/memory-access.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libdw/memory-access.h b/libdw/memory-access.h index 16c8c851..fca4129a 100644 --- a/libdw/memory-access.h +++ b/libdw/memory-access.h @@ -64,7 +64,7 @@ __libdw_max_len_sleb128 (const unsigned char *addr, const unsigned char *end) #define get_uleb128_step(var, addr, nth) \ do { \ unsigned char __b = *(addr)++; \ - (var) |= (typeof (var)) (__b & 0x7f) << ((nth) * 7); \ + (var) |= (__typeof (var)) (__b & 0x7f) << ((nth) * 7); \ if (likely ((__b & 0x80) == 0)) \ return (var); \ } while (0) @@ -112,11 +112,11 @@ __libdw_get_uleb128_unchecked (const unsigned char **addrp) #define get_sleb128_step(var, addr, nth) \ do { \ unsigned char __b = *(addr)++; \ - (var) |= (typeof (var)) (__b & 0x7f) << ((nth) * 7); \ + (var) |= (__typeof (var)) (__b & 0x7f) << ((nth) * 7); \ if (likely ((__b & 0x80) == 0)) \ { \ if ((__b & 0x40) != 0) \ - (var) |= - ((typeof (var)) 1 << (((nth) + 1) * 7)); \ + (var) |= - ((__typeof (var)) 1 << (((nth) + 1) * 7)); \ return (var); \ } \ } while (0) @@ -146,7 +146,7 @@ __libdw_get_sleb128 (const unsigned char **addrp, const unsigned char *end) { /* We only need the low bit of the final byte, and as it is the sign bit, we don't need to do anything else here. */ - acc |= ((typeof (acc)) b) << 7 * max; + acc |= ((__typeof (acc)) b) << 7 * max; return acc; } @@ -179,7 +179,7 @@ __libdw_get_sleb128_unchecked (const unsigned char **addrp) { /* We only need the low bit of the final byte, and as it is the sign bit, we don't need to do anything else here. */ - acc |= ((typeof (acc)) b) << 7 * max; + acc |= ((__typeof (acc)) b) << 7 * max; return acc; } -- 2.36.1.windows.1