From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>,
git@vger.kernel.org, ps@pks.im,
"Randall S. Becker" <rsbecker@nexbridge.com>
Subject: Re: [PATCH] reftable: make REFTABLE_UNUSED C99 compatible
Date: Thu, 29 May 2025 21:12:53 -0700 [thread overview]
Message-ID: <xmqq7c1yivne.fsf@gitster.g> (raw)
In-Reply-To: <aDjp_IkgmITrl59-@tapette.crustytoothpaste.net> (brian m. carlson's message of "Thu, 29 May 2025 23:13:00 +0000")
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> On 2025-05-29 at 16:17:14, Junio C Hamano wrote:
>> Corresponding definition we use in the main part of the project
>> defined in compat/posix.h looks like this:
>>
>> #if GIT_GNUC_PREREQ(4, 5)
>> #define UNUSED __attribute__((unused)) \
>> __attribute__((deprecated ("parameter declared as UNUSED")))
>> #elif defined(__GNUC__)
>> #define UNUSED __attribute__((unused)) \
>> __attribute__((deprecated))
>> #else
>> #define UNUSED
>> #endif
>>
>> GCC 4.5 or older may no longer be relevant, in which case yours may
>> be good enough.
>
> RHEL 7, which is now well past EOL, had GCC 4.8 and Debian 7, released
> in 2013 and also well past EOL, had GCC 4.7. I think we can safely
> assume nobody within our support policy is using GCC before 4.5.
Good digging. There is another one in git-compat-util.h that
is conditional on GIT_GNUC_PREREQ(3,1) which we can simplify away to
just "#ifdef __GNUC__", together with the above. Of course totally
outside of Carlo's fix to the reftable library.
Thanks.
next prev parent reply other threads:[~2025-05-30 4:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 18:59 Build Failure: Git 2.50.0-rc0 on NonStop rsbecker
2025-05-29 10:11 ` [PATCH] reftable: make REFTABLE_UNUSED C99 compatible Carlo Marcelo Arenas Belón
2025-05-29 16:17 ` Junio C Hamano
2025-05-29 23:13 ` brian m. carlson
2025-05-30 4:12 ` Junio C Hamano [this message]
2025-05-30 5:35 ` Patrick Steinhardt
2025-05-30 6:25 ` Jeff King
2025-05-30 8:47 ` Patrick Steinhardt
2025-05-30 16:28 ` Junio C Hamano
2025-05-30 12:04 ` [Bug] Build Failure: Git 2.50.0-rc0 on NonStop rsbecker
2025-05-30 14:19 ` Kristoffer Haugsbakk
2025-05-30 14:26 ` Patrick Steinhardt
2025-06-01 9:36 ` rsbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7c1yivne.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=rsbecker@nexbridge.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).