[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <283ffe91-5181-4544-8913-e4d1d6895d5c@freemail.hu>
Date: Wed, 8 Jan 2025 00:24:16 +0100
From: Szőke Benjamin <egyszeregy@...email.hu>
To: Jan Engelhardt <ej@...i.de>
Cc: Jozsef Kadlecsik <kadlec@...filter.org>, fw@...len.de,
pablo@...filter.org, lorenzo@...nel.org, daniel@...earbox.net,
leitao@...ian.org, amiculas@...co.com, davem@...emloft.net,
dsahern@...nel.org, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
horms@...nel.org, netfilter-devel@...r.kernel.org, coreteam@...filter.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 09/10] netfilter: Add message pragma for deprecated
xt_*.h, ipt_*.h.
2025. 01. 07. 23:38 keltezéssel, Jan Engelhardt írta:
>
> On Tuesday 2025-01-07 23:06, Szőke Benjamin wrote:
>>>
>>> I still don't know whether adding the pragmas to notify about header file
>>> deprecation is a good idea.
>>
>> Do you have any other ideas how can you display this information to the
>> users/customers, that it is time to stop using the uppercase header files then
>> they shall to use its merged lowercase named files instead in their userspace
>> SW?
>
> ``__attribute__`` is just as implementation-specific as ``#pragma``, so it's
> not really an improvement, but here goes:
>
> ----
> struct __attribute__((deprecated("This header file is deprecated"))) dontusethisstruct {
> };
> extern struct dontusethisstruct undefinedstruct;
> ----
As i know it is a feature only in GCC, can it work with Clang compiler?
https://renenyffenegger.ch/notes/development/languages/C-C-plus-plus/GCC/__attribute__/deprecated/index
By the way it is perfect for through a warning for a deprecated struct, function
etc ... only in GCC, but it is not ideal to use a simple header file include and
the syntax of it is horryble. Usage of a generic #pragma message is more
feasible in all compilers.
Powered by blists - more mailing lists