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 505C3A04BC; Fri, 9 Oct 2020 23:39:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E5AB1D585; Fri, 9 Oct 2020 23:39:10 +0200 (CEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by dpdk.org (Postfix) with ESMTP id C48001D56C for ; Fri, 9 Oct 2020 23:39:07 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id g10so7934007pfc.8 for ; Fri, 09 Oct 2020 14:39:07 -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=Fl18w+qEQZAnO8xZvJPouGiJWfcIVDnbWJpAE+JqxGu0PS88oFTgN3h4Ux9nJHioRu sgpqQnai8vRVJJvETp76PzOP2l7AIuBsqnKgHjpl73IwRNXYuPqclav8jQiCCjupUfyo RInU8F1j3mNpxSzzPO6wy17avJBEAIQG4SDziIyB0/QGpcOp2ZreAkLdtyhsEM+++mhm 36rB7ZQdS4iE3sE13rY21CORTcIKjPyk7lqbfXbLDya8YvvUt68RhvGkzks2QmP0xO7r H64zF3dI/uod1Jd0z2LQTr0J7w+iIkgSf5iXKxD8v8iU0jNbC8PNewCrZ1RrHb2EkCXG 3TOg== 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=icnPbZaqbgr2P/07uH/H2DW+6ngYLyC5U0q9DK6UH/D7l49njT36HZ0+fwvt1I/fId jXoJBq22eqbSnWblgxFXWM+TGh+c1vULDYN9V8D8lhxYJ6Vm/0ai5syURMpfls0iMqJL UK/tkj3j8OY0o4lmUBcaNcymLhjdSceeIX/F3BalbghFzJkU+trbY2sqQ9naZdGJYtJj pKXetkDf/U8LDFyD9kRdkycEZjkvLSWib+4taIJ1HwWeMhqlpEcoHeUthQGvOtZ8q8K5 mxWsIGeuaX+pPiOMGfxPPi16Jf0LFp0uCbgZzDNA+WV2Zaya6CugAOojNnt7u2ih1I5z 79rA== X-Gm-Message-State: AOAM530igjDed2jYOn4rULTy6Gs8OIGg+HQ08kgKqKtnIH/E1DotDdSu BUUVWXww44jLMlVbYNzFDdstJ0CspqD3dQ== X-Google-Smtp-Source: ABdhPJy5zJqkoBVDoceA8y5oKNdpbmzsCytEaPWQsZyf4XFJDOOkDVKq2CillftFOsuqA7INy5QtZw== X-Received: by 2002:aa7:9358:0:b029:152:b349:8af8 with SMTP id 24-20020aa793580000b0290152b3498af8mr14640615pfn.9.1602279545713; Fri, 09 Oct 2020 14:39:05 -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 x18sm12173381pfj.90.2020.10.09.14.39.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 14:39:04 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , Bruce Richardson Date: Fri, 9 Oct 2020 14:38:40 -0700 Message-Id: <20201009213855.17933-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201009213855.17933-1-stephen@networkplumber.org> References: <20200911190701.29171-1-stephen@networkplumber.org> <20201009213855.17933-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 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 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