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 C50C1A04B1; Wed, 23 Sep 2020 11:18:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A43641DC60; Wed, 23 Sep 2020 11:18:27 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 82EE01C1E1 for ; Wed, 23 Sep 2020 11:18:25 +0200 (CEST) IronPort-SDR: 8t1DpnyfmHXbmnIKSDjLwLci2073x+ESH34gjct6G3dXUoaziRd/rFUaaC1lPsC6GZAEz6kI29 9yLxtBMOCnhQ== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="161773232" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="161773232" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 02:18:24 -0700 IronPort-SDR: atY7Aamm1EObA+VnhCvlt4ANnYssIehFTIVMtKUihme2s8o+NrNrfL3PIbChJqh28EFuc9rO3+ 8KuckWDMcHuA== X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="511579628" Received: from jdfactor-mobl1.ger.corp.intel.com (HELO [10.213.251.46]) ([10.213.251.46]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 02:18:23 -0700 To: Stephen Hemminger , dev@dpdk.org References: <20200922143202.8755-1-stephen@networkplumber.org> <20200922143202.8755-2-stephen@networkplumber.org> From: "Burakov, Anatoly" Message-ID: <94bd7877-eecf-7888-2a3a-c12413403b25@intel.com> Date: Wed, 23 Sep 2020 10:18:21 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200922143202.8755-2-stephen@networkplumber.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [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" On 22-Sep-20 3:31 PM, Stephen Hemminger wrote: > 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. > */ > Don't we already have this in the master/slave lcore patchset? -- Thanks, Anatoly