From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id DAF7BA04C7;
	Mon, 14 Sep 2020 20:20:31 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 5482E1C0CD;
	Mon, 14 Sep 2020 20:20:16 +0200 (CEST)
Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com
 [209.85.216.43]) by dpdk.org (Postfix) with ESMTP id E95B81BE95
 for <dev@dpdk.org>; Mon, 14 Sep 2020 20:20:13 +0200 (CEST)
Received: by mail-pj1-f43.google.com with SMTP id fa1so300135pjb.0
 for <dev@dpdk.org>; Mon, 14 Sep 2020 11:20:13 -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=XQvGoSAQrrP5gxOOZ5F6xs/hysKbG69WDz078lSyVRi3EAhKK2eWk8FCHMK7pL3g9Y
 4J4p3GDAQo0/OAKNt7/uULyPx6Z0Um8ihIwFO9WDGBRdpyL7pcU62RLkQFc/sAa61+U9
 VA5QVW/Xjye60sqj+JZCF/Vh8SU4t6cj8feZJT/vVK6QXsS4n7Ce71WbG85D+p3Dh3Vb
 T8M0ac8zerG9Wc3wEuMyQbuSceigsYSecJqXFJV/+WKIgMYqHNkc9uy7tjW363kl7mff
 Za55cOMxyOtymViOPk7QRsmqdGgtb3wK1uTpNfvdZ+z4bLi+lypVj5LclFcpdVnhoJf/
 EXaA==
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=UjwQMzLZdwp4ecwYX8zEtFjFpUseO302tMWP0FfBMxBiqBiOkPrSEXWNBvMbWEYMNQ
 NwFHmSy3Ror6aaL3M6nPaUc5rGt8aUa66ik5EGVo0ELZ713ypIFRD7r12lR6TvfnGPqD
 pGd7T62OvDluDEnJy5uSIHIs0S60CQCNpeJVPln4h0qB/ZL5GT6KYfsMGw+lhkvwvjLA
 TsaBqElVTJ0S3gXwjOTHayEPcpe/00nJiB1l+hnMvuRFeYt+hVfUo3tVe4JfjMvxnKni
 AlnPVV1HJaXAOisk0R1ksfgegm/n4652gFC0OhAobE83gTqtU3ROWoLM60bg121eQAp1
 FEDA==
X-Gm-Message-State: AOAM530khYTHnZXvLXyMvjkCslpG2uJlMqU4DBgREl/m7e8v44i2sQm/
 j54YC9Ruw5OFHkEMiJYYLGXDkLdT2AQkQg==
X-Google-Smtp-Source: ABdhPJzY5AxK43vg83vKJu9D+37+jgB9QNQj+aFN+jA0o5fFFE6q4dTEctBHkmGmU47//dNkv+lw7Q==
X-Received: by 2002:a17:90b:108e:: with SMTP id
 gj14mr563504pjb.225.1600107612758; 
 Mon, 14 Sep 2020 11:20:12 -0700 (PDT)
Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])
 by smtp.gmail.com with ESMTPSA id u6sm9952728pjy.37.2020.09.14.11.20.11
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 14 Sep 2020 11:20:11 -0700 (PDT)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 14 Sep 2020 11:19:47 -0700
Message-Id: <20200914182002.6750-3-stephen@networkplumber.org>
X-Mailer: git-send-email 2.27.0
In-Reply-To: <20200914182002.6750-1-stephen@networkplumber.org>
References: <20200911190701.29171-1-stephen@networkplumber.org>
 <20200914182002.6750-1-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH v2 02/17] 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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Add a macro that causes GCC and CLANG to emit a warning when
a deprecated macro is used.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 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