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 9ECACA04B7; Wed, 14 Oct 2020 17:28:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E97161DDF8; Wed, 14 Oct 2020 17:28:09 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by dpdk.org (Postfix) with ESMTP id 9A15A1DC34 for ; Wed, 14 Oct 2020 17:28:04 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id hk7so5890pjb.2 for ; Wed, 14 Oct 2020 08:28:04 -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=MPfewPhmhpVTykWxFZ5XLblXWzSyaZmPN/XaFuyicL5a7Lp3dQ1QMt+nNlTIF7JvjX PrBz6t/YSs+uJV1ol7Wc2eu9I47rn5gZJzzY6abwWBtC/mDYSAkBfbGPEuB7q+1pe07G TEUIUYv2pDPTjN5wf7XoWFHzKxm5tBDaXJqz4OQD5u5pqRThcGT+rSBI4Xd3//xfN9cj BnPdX9s6vfJe5fJUMuJSRtX21aBQ/udRLqP/yspO68QG8J/9hBVh3RdoMl1Fds/ckgwW mDlDM5e/FW9yS7HgootiudHDbMWByhjqhSKcwTX4c1eno4wK2/MF4qVRRPHdQlXSr5rF ixig== 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=RWJTJP4LnE2gelnp4zU79kRGxnjIzmVecT5gxR46E3w+LEp7EKvkKZfOWnuC5uHPxu 0eQ0MA9yZ7AEFTqWxDil3K9kmtzplenLIVUyyZ37VMPn3fF+nMKTLgACE2wMmMbqlX72 213Ohm51bVi+0idQpoQ9eOyIL54v4NIBES3mcDJdB1dsubeLql4+k2y2l3Gv0YG4Wn5U 8peNDcOgtXnPo05MgezoZoVhErj0YCUJGIseGU81tG6TG60c6Z0L+EBMbM0zSlEcgYc1 lR9jy1QcQMv1atBbBX3ez90PT6mDz+ITJq0gIMjr9TsxlzDFh9LboHRlB1tekMmPMzeN BwZA== X-Gm-Message-State: AOAM531hciQ7UWnw8IH0dmB2MbncbVXHwzAM7eohNw9hcibpUqMbtEOF yWRswGStm3WI0AIuIojIZbmdPx4I1F8bKA== X-Google-Smtp-Source: ABdhPJybm8srlCntKKhbLdNP6q8o5Skpln0K1MoU+gl9/cZeq4TNHXFMapjv8kaaDKEf5KOqhOGTEw== X-Received: by 2002:a17:902:9f96:b029:d4:c459:a181 with SMTP id g22-20020a1709029f96b02900d4c459a181mr13989plq.28.1602689282285; Wed, 14 Oct 2020 08:28:02 -0700 (PDT) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j11sm3653457pfh.143.2020.10.14.08.28.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 08:28:01 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , Bruce Richardson Date: Wed, 14 Oct 2020 08:27:40 -0700 Message-Id: <20201014152756.6518-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201014152756.6518-1-stephen@networkplumber.org> References: <20200911190701.29171-1-stephen@networkplumber.org> <20201014152756.6518-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 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