From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2CCB9A04B6; Tue, 22 Sep 2020 16:32:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8713A1D576; Tue, 22 Sep 2020 16:32:10 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by dpdk.org (Postfix) with ESMTP id 7C4491D440 for ; Tue, 22 Sep 2020 16:32:07 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id gf14so1540680pjb.5 for ; Tue, 22 Sep 2020 07:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BKoNvCGHHCciA2cyrqYWNo/DvzMsczXyOP5wyNsvBuo=; b=ROMC0GjRaLbnr9wRjP/D9ToP370Lo5tCaZQtB7tTxcggVYvZX76Ub79rf3UUbEtV3C 3ZkQs6zWMzc+qXxyJg8Uqm8zAmQzn5r4OmdOAUHP4HPE7T7SgikF0/CtEbh9R/9+PGTK KzWPjxjOScctrpmLMyl1TjJsbACf3tLH254Dik6R4Fx+HPKB+Fl1OhL4xuY0Oy5HuP3g O4jszz6a25d8ptKLvSgLNmWagjb8A7owi8TfXNnMFB9YLzwJDQxPgboHNBtuA41oY2bp 0JtyjUhScUC2Tb7xkPSooA4Ie2M8u9J1np1wlKWQQsewnaMeUGuj/4YdaiwPgVWeOipE DMdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BKoNvCGHHCciA2cyrqYWNo/DvzMsczXyOP5wyNsvBuo=; b=NldJS9HZ/fvMux3AKFeX8xCWivowWPgrE6vcEDKYd3jts1efUk71ojKywWcVAeIo6v Qxt6myNfZ0k4jOtIO1WC/eLZznEw0W47UkIMXfWE/qpmNPo8DroAULbZjG3jKjj5WoE6 lM7zhmGwoXwhEtKG0+P9E6tdSowY09R0UdMrLLId+ss6MWGTK9N/S2E1F1Yhyl+v22sZ S/o5jYxlMmwnZGZNM057LABQXTJtLdzb1S5BGVj/Ij2LLEHjISu11t+WPOx0rnUE61fT 2KDhBvVb6j0pnK9B2mnAnKlg2cNZ8sVkwgKCkSev3tjrOq2SpG4OMo025L3VPv5sPtdh f4yg== X-Gm-Message-State: AOAM533fARJ7hwUZWGaynVFYQNVvYKYS/DfMMNEbN1ujMo8iXZgRdJNm eL6RAoGQy9tvFQxS9hBye6UJJw/1B9OtRA== X-Google-Smtp-Source: ABdhPJwGaarSGxMeqJ2fmFhW1jLV9fWNXtXuutpDBH13GT4eqraARhRwTFp27ZzGS+wW47ACl8+MQg== X-Received: by 2002:a17:90a:d488:: with SMTP id s8mr4159776pju.176.1600785126307; Tue, 22 Sep 2020 07:32:06 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l14sm4786037pfc.170.2020.09.22.07.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 07:32:05 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 22 Sep 2020 07:31:55 -0700 Message-Id: <20200922143202.8755-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200922143202.8755-1-stephen@networkplumber.org> References: <20200922143202.8755-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/8] eal: add macro to mark macros as deprecated X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add a macro that causes GCC and CLANG to emit a warning when a deprecated macro is used. Signed-off-by: Stephen Hemminger --- lib/librte_eal/include/rte_common.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h index 8f487a563dfc..c6714b67b411 100644 --- a/lib/librte_eal/include/rte_common.h +++ b/lib/librte_eal/include/rte_common.h @@ -86,6 +86,17 @@ typedef uint16_t unaligned_uint16_t; /******* Macro to mark functions and fields scheduled for removal *****/ #define __rte_deprecated __attribute__((__deprecated__)) +/** + * Macro to mark macros and defines scheduled for removal + */ +#if defined(RTE_CC_GCC) || defined(RTE_CC_CLANG) +#define RTE_PRAGMA(x) _Pragma(#x) +#define RTE_PRAGMA_WARNING(w) RTE_PRAGMA(GCC warning #w) +#define RTE_DEPRECATED(x) RTE_PRAGMA_WARNING(#x is deprecated) +#else +#define RTE_DEPRECATED(x) +#endif + /** * Mark a function or variable to a weak reference. */ -- 2.27.0