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 CB9E9A04B7; Tue, 13 Oct 2020 17:27:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A4BC1DD03; Tue, 13 Oct 2020 17:26:35 +0200 (CEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by dpdk.org (Postfix) with ESMTP id 604131DCF8 for ; Tue, 13 Oct 2020 17:26:33 +0200 (CEST) Received: by mail-pj1-f48.google.com with SMTP id g16so35400pjv.3 for ; Tue, 13 Oct 2020 08:26:33 -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=xjDZBv8PEVFSADviChERtKSbc8Bep9VrBTN02CBIShvD/k1AKR5TVktalMD/4EzdhZ g2lG5labWo/ayvpsAgowV7SAm06nRP8HcykL3UbVjPRfdCCv8IS75PStNN3QTXxHwm3w z6NGRykFfhvztszDXRihzeM/SjXqCSiiKUa33ZUcI53Telu0yl2Z/Hf47YAR+1p48Xbn DGCrZRXKIIL/6nCRgz18b4F/bpkUSRdPPEF+Bhmhnn4+anHQjODiG136uGaX2UTaQA7y 31y9DyZjnvRNKuiXpDey0ql5nZMFerVt1DQwVSkkq1qG66v3SIQGeAvlFTGnDQCTjl0l TXOg== 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=gq+4kS7u/lsAF+BDKl//ghssC6WCgMsUquMsWxy3PDXYbkrj4OCLCQ0/UDl/hQXYFV R+law9B2Xdb8TFHrHJPBaF3ye2uBGIvhU2hWLDloc/+/+t46tIPDjsnWs1Iw6amKcS32 ABpZZzZrGnMKF+/5YyFig+cWDjt7SNleMBlcz8uvtRu0GU/EHG+OiQCzDOOerH7b3kCp cRJGSLuVcLgQLFf4tpcNNCKQOx77+ANV/RhTEkl4juEvJgHULOvERSUJP2qLLrYpkJd0 u5R16ALdGqwM7XIoRujB0xqNhwK3U6Hai82qOIZvMIHNlYSoPfgE+R58YuM7ASVXWXaS q+TQ== X-Gm-Message-State: AOAM533gY9c91ysWy9gtwxbJyidzrn5yfBiykx8HQdYVmtoTDisIyuE4 NdmiVh2g/ehyiSspRfSGHWKVS8lb1lx79A== X-Google-Smtp-Source: ABdhPJywPRbP0cxvkLsm9lh+z17jQNcx7lsxg5bgpEJz+GFqkNxNSrKQ8Ic6lfgPjq8gOoBwtuF7jw== X-Received: by 2002:a17:90a:680b:: with SMTP id p11mr259417pjj.232.1602602789823; Tue, 13 Oct 2020 08:26:29 -0700 (PDT) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z12sm23815233pfr.197.2020.10.13.08.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 08:26:26 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , Bruce Richardson Date: Tue, 13 Oct 2020 08:25:54 -0700 Message-Id: <20201013152610.2589-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201013152610.2589-1-stephen@networkplumber.org> References: <20200914182002.6750-1-stephen@networkplumber.org> <20201013152610.2589-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 02/18] 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