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 B996DA0527; Mon, 20 Jul 2020 20:51:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0EF4F1BFBA; Mon, 20 Jul 2020 20:51:24 +0200 (CEST) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id A16682C6E for ; Mon, 20 Jul 2020 20:51:22 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id p3so10730681pgh.3 for ; Mon, 20 Jul 2020 11:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jLmXrIeOdbmvBpo15nsR6E+C3uds9R1bTroRHNgy+Ek=; b=Rp6GM+wmmEBA6oPRTAgetU1a3Sj4IQCCixYXZ7FLqglZVhj9TMYBQI/mnMsbVSuG+s rtb6/crLPlwnHh3WXnJTpvBxx531ctHldsNCOU/aqq++UkIKOWJEJxgliqad4Q8QKw9i lpQbM4NHve1lwVCXlIX4s4MHbTjJ3hUZtCWnZt+swQ36RZphXGZXsqp4IbF59+42MY+h ZvTRM7Oyi3vYtc5E/+ntyu1EmPpVukUXYGoVZoqw/RF3CMWKClskVYaDN9rCdT1c4/qf +siosYAxzLyu0i5i+MrPx3BOUeThuNCpO4Y/YXytFEyuUU4FDsozCM2Ceoj+EBKdWl+a bZCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jLmXrIeOdbmvBpo15nsR6E+C3uds9R1bTroRHNgy+Ek=; b=LoAKI9MbiIwERCPqDt1kUvyxugKzaKHmpKwP5vLDxfk+w6jMI+sddYLmNBdPsE6jZS FBQb2Kab9bSw3waxUw+xa06q4v2tMF6tt/qwRDaLqCiTMzxrzXvJrC72aP07Lr2aXOJS Bw3y2AnbjC8Gn5NwftDGRzOCwPBBjnYnD8icAi1/RUqOO7+bKofzXrQjzoZWl7yVUutR bg9LuNJr1gNMgvC340ioCLO6XGl4CDwx228G1WCFeMwNtGy8nMVWJWlzcQ26ANGvRlc8 l83L0iic/GanP9gWrIUV/TNE18D9PgmRys480plltxvGR56Rs0hCu72Fni17cAaQWiZ/ TKGg== X-Gm-Message-State: AOAM531fjWhCmPzFSRBz7/e4YxRceCrmKviCaRVsANbmqwroHFwYQTo3 oNab+g9AxBYi0+od7mE3hZd3fw== X-Google-Smtp-Source: ABdhPJwz4ie2FAU274kDZcuQLCmBWhW3IjbFFC9vuNr3u1IsmBZvJu9clF0dwEw14fhCghemAjXhrg== X-Received: by 2002:a63:fe0a:: with SMTP id p10mr19270289pgh.255.1595271081243; Mon, 20 Jul 2020 11:51:21 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d18sm310767pjv.25.2020.07.20.11.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 11:51:20 -0700 (PDT) Date: Mon, 20 Jul 2020 11:51:12 -0700 From: Stephen Hemminger To: "Burakov, Anatoly" Cc: dev@dpdk.org Message-ID: <20200720115112.14ef4f5d@hermes.lan> In-Reply-To: References: <20200604210200.25405-1-stephen@networkplumber.org> <20200701202359.17006-1-stephen@networkplumber.org> <20200701202359.17006-26-stephen@networkplumber.org> <20200715132910.5aaa11ed@hermes.lan> <2e34fe08-6548-e474-a7bc-f10e4bef947a@intel.com> <20200716150429.664a524e@hermes.lan> <88cf6911-c0e5-1f37-5f2d-51232d8dc787@intel.com> <20200717192235.3636fcce@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 25/27] eal: mark old naming 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" On Mon, 20 Jul 2020 13:32:27 +0100 "Burakov, Anatoly" wrote: > On 18-Jul-20 3:22 AM, Stephen Hemminger wrote: > > On Fri, 17 Jul 2020 16:21:37 +0100 > > "Burakov, Anatoly" wrote: > > > >> On 16-Jul-20 11:04 PM, Stephen Hemminger wrote: > >>> On Thu, 16 Jul 2020 14:41:41 +0100 > >>> "Burakov, Anatoly" wrote: > >>> > >>>> On 15-Jul-20 9:29 PM, Stephen Hemminger wrote: > >>>>> On Wed, 15 Jul 2020 14:28:17 +0100 > >>>>> "Burakov, Anatoly" wrote: > >>>>> > >>>>>>> -#define SKIP_MASTER SKIP_INITIAL > >>>>>>> -#define CALL_MASTER CALL_INITIAL > >>>>>>> +#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL > >>>>>>> +#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL > >>>>>> > >>>>>> Presumably this is a generic header, should we introduce GCC-specific > >>>>>> things there? > >>>>> > >>>>> It works with Clang as well. Likely ICC but don't have that. > >>>>> > >>>> > >>>> What about MSVC? > >>>> > >>> > >>> _Pragma is C99 standard so MSVC know it. > >>> MSVC should ignore any pragman it doesn't understand. > >>> > >>> There is a better pragma for deprecating keywords in MSVC, but GCC and Clang don't > >>> understand it. > >>> > >> > >> Deprecating macros sounds like something we might want to do in the > >> future, can't we put some macro into rte_common.h to address this? e.g. > >> something like > >> > >> #ifdef MSVC > >> #define rte_deprecated_macro _msvc_pragma_whatever() > >> #else > >> #define rte_deprecated_macro _Pragma("GCC warning ...") > >> #endif > >> > >> and use this macro here? > > > > It gets hard to do macro in a macro, > > > > I don't have a strong opinion on this, but IMO it's certainly better > than having a compiler-specific things in an API header file :) > I was hoping for macro volunteer? Something like: #define RTE_DEPRECATED(foo) ...