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 BE261A04DB; Fri, 16 Oct 2020 00:58:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 34E7B1E4A1; Fri, 16 Oct 2020 00:57:54 +0200 (CEST) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by dpdk.org (Postfix) with ESMTP id CD7701DFEB for ; Fri, 16 Oct 2020 00:57:49 +0200 (CEST) Received: by mail-pj1-f50.google.com with SMTP id a1so318564pjd.1 for ; Thu, 15 Oct 2020 15:57:49 -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=E6Kb3jd479DmxYI4bsO7U2tx8VEJa4Vr4XvecsGO4yY=; b=eRa5MLYb1ARzq92cu5++95R84zpQ5IhyUA84rT0YQWb2+13wtlEjOQBQ+LPUxBNY7O bI7cRnFfoTbByQ9/DoHfbvYaj/S+mdbgAUs55I8Hdgjjg+Yr0fUOw3GxMdL4ByZJkFFI t+iaHrASFQBseJ4ZzMIFMcrlWMtm+BWmmQdyN+gsR+XiNktWGGpaYr5HE5a3Hpj39wQe ecpUD0c3UlmNuI9U8KvsGB325H41Kte1puCOdildLzkkOBtzJQbloz09cTgXioedVJcY RSrIMFhOq2/1ML3II2U4E/3EGyDQTyom2KgoX4pYHB2IjGkSyKiFvLle78yLXtWtNlHx sFgQ== 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=E6Kb3jd479DmxYI4bsO7U2tx8VEJa4Vr4XvecsGO4yY=; b=t/M4YYpi1vjC24bi6qttbbcfRVZA/mGuwC5/STMF33KGb2vJfe05WcPxWUdHodoHdM dBVt78fVetSTQUzxMy8M27QRtG5rL62/hP93nLucAUwNmOdRm72Y2Yt3j/1dbC1rxvDK tt4KlC+0/E3fo6vfaCHiln+ij+SBE5ZWMUDZ4cpxYAexStywsl4Ovo2vXHpSsCN5YfX9 3lqUV2PuFsBwHkPH0QsTaT4VJgSnW/jHSD8eHwcoByeRgEv4G/Qu94rRdcEUPsHDVMsH QjrhMdgI9LpvCtr5FJjDACb4k8hH9mP1Hx0cRaydFIRzYRiUgUTrJY9mjMeB3cMaOUkD eoKA== X-Gm-Message-State: AOAM532t+SFjpKqrBVtJxa+b35UTSa6TAm3VVsU6kN8UbvSOaydCQFCS /UC4tkB5eTCU8022RAMfZUA31oF+dqpmrA== X-Google-Smtp-Source: ABdhPJxpbrAq1Yv/eZM2rZwL8G0HdS1P7F0qw9rrNKzcOxUPKd7ZhvByQKbLRzLouvWyvZMEZr0SGw== X-Received: by 2002:a17:902:8a8a:b029:d5:ab9e:1d5d with SMTP id p10-20020a1709028a8ab02900d5ab9e1d5dmr986504plo.32.1602802667577; Thu, 15 Oct 2020 15:57:47 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id x4sm324055pfm.86.2020.10.15.15.57.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2020 15:57:46 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , Bruce Richardson Date: Thu, 15 Oct 2020 15:57:18 -0700 Message-Id: <20201015225736.12167-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201015225736.12167-1-stephen@networkplumber.org> References: <20200911190701.29171-1-stephen@networkplumber.org> <20201015225736.12167-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 02/20] 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. Acked-by: Anatoly Burakov Acked-by: Bruce Richardson 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 2920255fc1e3..173fcd7223e4 100644 --- a/lib/librte_eal/include/rte_common.h +++ b/lib/librte_eal/include/rte_common.h @@ -87,6 +87,17 @@ typedef uint16_t unaligned_uint16_t; #define __rte_deprecated __attribute__((__deprecated__)) #define __rte_deprecated_msg(msg) __attribute__((__deprecated__(msg))) +/** + * 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