{"thread":{"id":"65582","subject":"[PATCH] compat/posix.h: enable UNUSED warning messages for Clang","startedAt":"2026-05-03T15:28:58Z","lastAt":"2026-06-15T08:48:42Z","messageCount":20,"participants":["Dominik Loidolt","Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"542612","messageId":"20260503151210.36036-1-dominik.loidolt@univie.ac.at","threadId":"65582","inReplyTo":null,"subject":"[PATCH] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-05-03T15:12:10Z","receivedAt":"2026-05-03T15:28:58Z","isPatch":true,"body":"Treat Clang like GCC 4.5+ so using an UNUSED parameter emits the\nintended warning message.\n\nCommit 7c07f36ad2 (git-compat-util.h: GCC deprecated message arg only in\nGCC 4.5+, 2022-10-05) restricted use of the deprecated attribute's\nmessage argument in the UNUSED macro to GCC 4.5 or newer.\n\nClang identifies itself as GNUC 4.2.1 for compatibility, causing the\ncurrent check to use the deprecated attribute without a message, even\nthough Clang supports deprecated(\"...\") since version 2.9 (2011).\n\nSigned-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n---\nI am not familiar with git's minimum compiler version but this patch\ndrops support for Clang < 2.9 from 2011.\n\nDominik\nP.S. This is my first patch sent by email. Please let me know if I\nmissed something.\n\n compat/posix.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex 245386fa4a..ed83a4d9d4 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -35,7 +35,7 @@\n  * When a parameter may be used or unused, depending on conditional\n  * compilation, consider using MAYBE_UNUSED instead.\n  */\n-#if GIT_GNUC_PREREQ(4, 5)\n+#if GIT_GNUC_PREREQ(4, 5) || defined(__clang__)\n #define UNUSED __attribute__((unused)) \\\n \t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n #elif defined(__GNUC__)\n\nbase-commit: 67ad42147a7acc2af6074753ebd03d904476118f\n--\n2.54.0\n\n"},{"id":"542640","messageId":"xmqq1pfsq8sd.fsf@gitster.g","threadId":"65582","inReplyTo":"20260503151210.36036-1-dominik.loidolt@univie.ac.at","subject":"Re: [PATCH] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-05-04T01:10:26Z","receivedAt":"2026-05-04T01:10:29Z","isPatch":true,"body":"Dominik Loidolt <dominik.loidolt@univie.ac.at> writes:\n\n> Treat Clang like GCC 4.5+ so using an UNUSED parameter emits the\n> intended warning message.\n>\n> Commit 7c07f36ad2 (git-compat-util.h: GCC deprecated message arg only in\n> GCC 4.5+, 2022-10-05) restricted use of the deprecated attribute's\n> message argument in the UNUSED macro to GCC 4.5 or newer.\n>\n> Clang identifies itself as GNUC 4.2.1 for compatibility, causing the\n> current check to use the deprecated attribute without a message, even\n> though Clang supports deprecated(\"...\") since version 2.9 (2011).\n>\n> Signed-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n> ---\n> I am not familiar with git's minimum compiler version but this patch\n> drops support for Clang < 2.9 from 2011.\n\nDoes this \"drop support\" because you force _all_ versions of Clang\nto use the \"deprecated\" attribute, even though you _know_ some older\nversions do not understand it?  Don't these versions identify\nthemselves so that you can do\n\n\t#if defined(__clang__) && CLANG_VERSION >= 2.9\n\nI do not know if the userbase of GCC and Clang upgrade with a\nsimilar cadence, or we seem to say that we care about GCC 4.5\n(2010), so giving  a similar version detection for Clang and exclude\nones older than 2.9 sounds more appropriate.\n\n> Dominik\n> P.S. This is my first patch sent by email. Please let me know if I\n> missed something.\n>\n>  compat/posix.h | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/compat/posix.h b/compat/posix.h\n> index 245386fa4a..ed83a4d9d4 100644\n> --- a/compat/posix.h\n> +++ b/compat/posix.h\n> @@ -35,7 +35,7 @@\n>   * When a parameter may be used or unused, depending on conditional\n>   * compilation, consider using MAYBE_UNUSED instead.\n>   */\n> -#if GIT_GNUC_PREREQ(4, 5)\n> +#if GIT_GNUC_PREREQ(4, 5) || defined(__clang__)\n>  #define UNUSED __attribute__((unused)) \\\n>  \t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n>  #elif defined(__GNUC__)\n>\n> base-commit: 67ad42147a7acc2af6074753ebd03d904476118f\n> --\n> 2.54.0\n"},{"id":"542642","messageId":"xmqqqznsossj.fsf@gitster.g","threadId":"65582","inReplyTo":"xmqq1pfsq8sd.fsf@gitster.g","subject":"Re: [PATCH] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-05-04T01:41:16Z","receivedAt":"2026-05-04T01:41:19Z","isPatch":true,"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> I am not familiar with git's minimum compiler version but this patch\n>> drops support for Clang < 2.9 from 2011.\n>\n> Does this \"drop support\" because you force _all_ versions of Clang\n> to use the \"deprecated\" attribute, even though you _know_ some older\n> versions do not understand it?  Don't these versions identify\n> themselves so that you can do\n>\n> \t#if defined(__clang__) && CLANG_VERSION >= 2.9\n>\n> I do not know if the userbase of GCC and Clang upgrade with a\n> similar cadence, or we seem to say that we care about GCC 4.5\n> (2010), so giving  a similar version detection for Clang and exclude\n> ones older than 2.9 sounds more appropriate.\n\nIOW, something like this, perhaps?\n\n compat/posix.h | 13 ++++++++++++-\n 1 file changed, 12 insertions(+), 1 deletion(-)\n\ndiff --git c/compat/posix.h w/compat/posix.h\nindex faaae1b655..0dd0637fc9 100644\n--- c/compat/posix.h\n+++ w/compat/posix.h\n@@ -22,6 +22,17 @@\n  #define GIT_GNUC_PREREQ(maj, min) 0\n #endif\n \n+/*\n+ * Similar for clang \n+ */\n+#if defined(__clang__) && defined(__clang_minor__) && defined(__clang_major__)\n+# define GIT_CLANG_PREREQ(maj, min) \\\n+\t((__clang_major__ > (maj)) || \\\n+\t (__clang_major__ == (maj) && (__clang_minor__ >= (min))))\n+#else\n+# define GIT_CLANG_PREREQ(maj, min) 0\n+#endif\n+\n /*\n  * UNUSED marks a function parameter that is always unused.  It also\n  * can be used to annotate a function, a variable, or a type that is\n@@ -35,7 +46,7 @@\n  * When a parameter may be used or unused, depending on conditional\n  * compilation, consider using MAYBE_UNUSED instead.\n  */\n-#if GIT_GNUC_PREREQ(4, 5)\n+#if GIT_GNUC_PREREQ(4, 5) || GIT_CLANG_PREREQ(2, 9)\n #define UNUSED __attribute__((unused)) \\\n \t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n #elif defined(__GNUC__)\n"},{"id":"544775","messageId":"aiKMeHXOCulPAaXq@four.local","threadId":"65582","inReplyTo":"xmqqqznsossj.fsf@gitster.g","subject":"Re: [PATCH] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-05T08:44:40Z","receivedAt":"2026-06-05T08:55:16Z","isPatch":true,"body":"On Mon, May 04, 2026 at 10:41:16AM +0900, Junio C Hamano wrote:\n> > Does this \"drop support\" because you force _all_ versions of Clang\n> > to use the \"deprecated\" attribute, even though you _know_ some older\n> > versions do not understand it?  Don't these versions identify\n> > themselves so that you can do\n> >\n> > \t#if defined(__clang__) && CLANG_VERSION >= 2.9\n>\n> IOW, something like this, perhaps?\n\nYes, you're right. My original patch breaks older Clang versions for no\ngood reason.\n\nI'll send a v2 with an explicit Clang version check, as you suggested.\n\nThanks,\n Dominik\n"},{"id":"544777","messageId":"20260605094647.94805-1-dominik.loidolt@univie.ac.at","threadId":"65582","inReplyTo":"20260503151210.36036-1-dominik.loidolt@univie.ac.at","subject":"[PATCH v2] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-05T09:46:47Z","receivedAt":"2026-06-05T09:48:13Z","isPatch":true,"body":"Use a dedicated Clang version check for the UNUSED macro.\n\nCommit 7c07f36ad2 (git-compat-util.h: GCC deprecated message arg only in\nGCC 4.5+, 2022-10-05) restricted use of the deprecated attribute's\nmessage argument in the UNUSED macro to GCC 4.5 or newer.\n\nClang identifies itself as GNUC 4.2.1 for compatibility, so\nGIT_GNUC_PREREQ(4, 5) does not detect whether Clang supports the\ndeprecated(\"...\") form. Add GIT_CLANG_PREREQ() macro and use it to\nenable the UNUSED warning message for Clang 2.9 and newer.\n\nSigned-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n---\nv2:\n - add GIT_CLANG_PREREQ()\n - require Clang 2.9+ for deprecated(\"...\") in UNUSED\n\n compat/posix.h | 13 ++++++++++++-\n 1 file changed, 12 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex faaae1b655..88ad29d74b 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -22,6 +22,17 @@\n  #define GIT_GNUC_PREREQ(maj, min) 0\n #endif\n\n+/*\n+ * Similar for Clang\n+ */\n+#if defined(__clang__) && defined(__clang_minor__) && defined(__clang_major__)\n+# define GIT_CLANG_PREREQ(maj, min) \\\n+\t((__clang_major__ > (maj)) || \\\n+\t (__clang_major__ == (maj) && (__clang_minor__ >= (min))))\n+#else\n+# define GIT_CLANG_PREREQ(maj, min) 0\n+#endif\n+\n /*\n  * UNUSED marks a function parameter that is always unused.  It also\n  * can be used to annotate a function, a variable, or a type that is\n@@ -35,7 +46,7 @@\n  * When a parameter may be used or unused, depending on conditional\n  * compilation, consider using MAYBE_UNUSED instead.\n  */\n-#if GIT_GNUC_PREREQ(4, 5)\n+#if GIT_GNUC_PREREQ(4, 5) || GIT_CLANG_PREREQ(2, 9)\n #define UNUSED __attribute__((unused)) \\\n \t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n #elif defined(__GNUC__)\n\nbase-commit: a89346e34a937f001e5d397ee62224e3e9852040\n--\n2.54.0\n\n"},{"id":"544778","messageId":"aiKnqlI7WdcskDAs@pks.im","threadId":"65582","inReplyTo":"20260605094647.94805-1-dominik.loidolt@univie.ac.at","subject":"Re: [PATCH v2] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-06-05T10:40:42Z","receivedAt":"2026-06-05T10:40:50Z","isPatch":true,"body":"On Fri, Jun 05, 2026 at 11:46:47AM +0200, Dominik Loidolt wrote:\n> Use a dedicated Clang version check for the UNUSED macro.\n> \n> Commit 7c07f36ad2 (git-compat-util.h: GCC deprecated message arg only in\n> GCC 4.5+, 2022-10-05) restricted use of the deprecated attribute's\n> message argument in the UNUSED macro to GCC 4.5 or newer.\n\nAh. I was briefly wondering about this because the UNUSED macro already\nworks. But the important part here is that it's really only about better\ndiagnostics via the attribute message.\n\n> Clang identifies itself as GNUC 4.2.1 for compatibility, so\n> GIT_GNUC_PREREQ(4, 5) does not detect whether Clang supports the\n> deprecated(\"...\") form. Add GIT_CLANG_PREREQ() macro and use it to\n> enable the UNUSED warning message for Clang 2.9 and newer.\n\nThere's a second user of `GIT_GNUC_PREREQ` in \"git-compat-util.h\", but\nthat user checks for GCC 3.1. And as Clang identifies as a newer version\nwe don't have to adapt any other callsites.\n\n> diff --git a/compat/posix.h b/compat/posix.h\n> index faaae1b655..88ad29d74b 100644\n> --- a/compat/posix.h\n> +++ b/compat/posix.h\n> @@ -22,6 +22,17 @@\n>   #define GIT_GNUC_PREREQ(maj, min) 0\n>  #endif\n> \n> +/*\n> + * Similar for Clang\n> + */\n\nMicronit, not worth rerolling over: this could have easily been a single\nline: `/* Similar for Clang. */`\n\n> +#if defined(__clang__) && defined(__clang_minor__) && defined(__clang_major__)\n> +# define GIT_CLANG_PREREQ(maj, min) \\\n> +\t((__clang_major__ > (maj)) || \\\n> +\t (__clang_major__ == (maj) && (__clang_minor__ >= (min))))\n> +#else\n> +# define GIT_CLANG_PREREQ(maj, min) 0\n> +#endif\n> +\n>  /*\n>   * UNUSED marks a function parameter that is always unused.  It also\n>   * can be used to annotate a function, a variable, or a type that is\n> @@ -35,7 +46,7 @@\n>   * When a parameter may be used or unused, depending on conditional\n>   * compilation, consider using MAYBE_UNUSED instead.\n>   */\n> -#if GIT_GNUC_PREREQ(4, 5)\n> +#if GIT_GNUC_PREREQ(4, 5) || GIT_CLANG_PREREQ(2, 9)\n>  #define UNUSED __attribute__((unused)) \\\n>  \t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n>  #elif defined(__GNUC__)\n\nMakes sense, thanks!\n\nPatrick\n"},{"id":"544779","messageId":"aiK4BR86cuq5bmCe@four.local","threadId":"65582","inReplyTo":"aiKnqlI7WdcskDAs@pks.im","subject":"Re: [PATCH v2] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-05T11:50:29Z","receivedAt":"2026-06-05T11:50:42Z","isPatch":true,"body":"Thanks for the review!\n\nI noticed that the version-check style now differs between GCC and the newly\nintroduced Clang checks, would it make sense to make them consistent? Like:\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex faaae1b655..e20f8ec61e 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -17,7 +17,8 @@\n */\n #if defined(__GNUC__) && defined(__GNUC_MINOR__)\n # define GIT_GNUC_PREREQ(maj, min) \\\n-\t((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))\n+\t((__GNUC__ > (maj)) || \\\n+\t(__GNUC__ == (maj) && (__GNUC_MINOR__ >= (min))))\n #else\n  #define GIT_GNUC_PREREQ(maj, min) 0\n #endif\n\nI think the current GCC bit-shift check is harder to read.\nIf you agree, I could send a 2-patch v3 series, which would also clean up the\ncomment style nit.\n\n Dominik\n\n"},{"id":"544781","messageId":"aiLNqQgiQPlviB5X@pks.im","threadId":"65582","inReplyTo":"aiK4BR86cuq5bmCe@four.local","subject":"Re: [PATCH v2] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-06-05T13:22:49Z","receivedAt":"2026-06-05T13:22:56Z","isPatch":true,"body":"On Fri, Jun 05, 2026 at 01:50:29PM +0200, Dominik Loidolt wrote:\n> Thanks for the review!\n> \n> I noticed that the version-check style now differs between GCC and the newly\n> introduced Clang checks, would it make sense to make them consistent? Like:\n> \n> diff --git a/compat/posix.h b/compat/posix.h\n> index faaae1b655..e20f8ec61e 100644\n> --- a/compat/posix.h\n> +++ b/compat/posix.h\n> @@ -17,7 +17,8 @@\n>  */\n>  #if defined(__GNUC__) && defined(__GNUC_MINOR__)\n>  # define GIT_GNUC_PREREQ(maj, min) \\\n> -\t((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))\n> +\t((__GNUC__ > (maj)) || \\\n> +\t(__GNUC__ == (maj) && (__GNUC_MINOR__ >= (min))))\n>  #else\n>   #define GIT_GNUC_PREREQ(maj, min) 0\n>  #endif\n> \n> I think the current GCC bit-shift check is harder to read.\n> If you agree, I could send a 2-patch v3 series, which would also clean up the\n> comment style nit.\n\nI was wondering about that, too. The question that I have is whether\nthere's any particular reason why the check was written that way. So in\nthe best case we'd do some digging into the history to figure out why\nthis looks the way it looks like.\n\nPatrick\n"},{"id":"544797","messageId":"aiLxCWp8Bv-KQoLf@four.local","threadId":"65582","inReplyTo":"aiLNqQgiQPlviB5X@pks.im","subject":"Re: [PATCH v2] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-05T15:53:45Z","receivedAt":"2026-06-05T15:53:57Z","isPatch":true,"body":"On Fri, Jun 05, 2026 at 03:22:49PM +0200, Patrick Steinhardt wrote:\n> I was wondering about that, too. The question that I have is whether\n> there's any particular reason why the check was written that way. So in\n> the best case we'd do some digging into the history to figure out why\n> this looks the way it looks like.\n\nI think the current bit-shift style introduced by 89c855ed3c (git-compat-util.h:\nimplement a different ARRAY_SIZE macro for for safely deriving the size of\narray, 2015-04-30) was inherited from glibc [0].\n\nI found that NetBSD [1] has long used the more explicit comparison form instead\nof the bit-shift style, and other BSDs seem to do the same. So there is at\nleast established precedent for writing the version check that way. :-)\n\nI see no obvious reason to prefer the bit-shift style today.\n\n Dominik\n\n[0] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=4360eafdd20769fa9d42c075853271debd06f7d1\n[1] https://github.com/NetBSD/src/commit/2fffc76da21e012509677f5310464f62797bd1bf\n"},{"id":"544859","messageId":"aiZfIc8k-9Et25g6@pks.im","threadId":"65582","inReplyTo":"aiLxCWp8Bv-KQoLf@four.local","subject":"Re: [PATCH v2] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-06-08T06:20:17Z","receivedAt":"2026-06-08T06:20:25Z","isPatch":true,"body":"On Fri, Jun 05, 2026 at 05:53:45PM +0200, Dominik Loidolt wrote:\n> On Fri, Jun 05, 2026 at 03:22:49PM +0200, Patrick Steinhardt wrote:\n> > I was wondering about that, too. The question that I have is whether\n> > there's any particular reason why the check was written that way. So in\n> > the best case we'd do some digging into the history to figure out why\n> > this looks the way it looks like.\n> \n> I think the current bit-shift style introduced by 89c855ed3c (git-compat-util.h:\n> implement a different ARRAY_SIZE macro for for safely deriving the size of\n> array, 2015-04-30) was inherited from glibc [0].\n> \n> I found that NetBSD [1] has long used the more explicit comparison form instead\n> of the bit-shift style, and other BSDs seem to do the same. So there is at\n> least established precedent for writing the version check that way. :-)\n> \n> I see no obvious reason to prefer the bit-shift style today.\n\nThanks for digging!\n\nI don't really see a reason to keep the bitshift style, either. It could\nmake a difference if it was ever evaluated at runtime, as we would\nevaluate the arguments multiple times with youur version. But all of the\ninstances we have are evaluated at compile time anwyay, so that doesn't\nmatter much to us.\n\nI'll leave it up to you whether you want to send another iteration of\nthis patch series that also adapts the preexisting callsite to use the\nnew style.\n\nThanks!\n\nPatrick\n"},{"id":"544917","messageId":"20260608124419.38905-1-dominik.loidolt@univie.ac.at","threadId":"65582","inReplyTo":"20260605094647.94805-1-dominik.loidolt@univie.ac.at","subject":"[PATCH v3 1/2] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-08T12:44:18Z","receivedAt":"2026-06-08T12:45:44Z","isPatch":true,"body":"Use a dedicated Clang version check for the UNUSED macro.\n\nCommit 7c07f36ad2 (git-compat-util.h: GCC deprecated message arg only in\nGCC 4.5+, 2022-10-05) restricted use of the deprecated attribute's\nmessage argument in the UNUSED macro to GCC 4.5 or newer.\n\nClang identifies itself as GNUC 4.2.1 for compatibility, so\nGIT_GNUC_PREREQ(4, 5) does not detect whether Clang supports the\ndeprecated(\"...\") form. Add GIT_CLANG_PREREQ() macro and use it to\nenable the UNUSED warning message for Clang 2.9 and newer.\n\nSigned-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n---\nv3:\n- fix comment style nit\n- remove unnecessary parentheses around __clang_minor__ >= (min)\n\n compat/posix.h | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex faaae1b655..ffdfd91c7b 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -22,6 +22,15 @@\n  #define GIT_GNUC_PREREQ(maj, min) 0\n #endif\n\n+/* Similar for Clang. */\n+#if defined(__clang__) && defined(__clang_minor__) && defined(__clang_major__)\n+# define GIT_CLANG_PREREQ(maj, min) \\\n+\t((__clang_major__ > (maj)) || \\\n+\t (__clang_major__ == (maj) && __clang_minor__ >= (min)))\n+#else\n+# define GIT_CLANG_PREREQ(maj, min) 0\n+#endif\n+\n /*\n  * UNUSED marks a function parameter that is always unused.  It also\n  * can be used to annotate a function, a variable, or a type that is\n@@ -35,7 +44,7 @@\n  * When a parameter may be used or unused, depending on conditional\n  * compilation, consider using MAYBE_UNUSED instead.\n  */\n-#if GIT_GNUC_PREREQ(4, 5)\n+#if GIT_GNUC_PREREQ(4, 5) || GIT_CLANG_PREREQ(2, 9)\n #define UNUSED __attribute__((unused)) \\\n \t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n #elif defined(__GNUC__)\n\nbase-commit: a89346e34a937f001e5d397ee62224e3e9852040\n--\n2.54.0\n\n"},{"id":"544918","messageId":"20260608124419.38905-2-dominik.loidolt@univie.ac.at","threadId":"65582","inReplyTo":"20260608124419.38905-1-dominik.loidolt@univie.ac.at","subject":"[PATCH v3 2/2] compat/posix.h: simplify GIT_GNUC_PREREQ() comparison","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-08T12:44:19Z","receivedAt":"2026-06-08T12:45:47Z","isPatch":true,"body":"Replace the glibc-style bit-shift version comparison with an explicit\nmajor/minor comparison. This is easier to read and is consistent with\nthe format already used by GIT_CLANG_PREREQ() and many BSD\n<sys/cdefs.h> headers.\n\nThis has no runtime impact, as the macro is evaluated at compile time.\nIt is also more future-proof, as it no longer assumes that GCC version\ncomponents stay below 65536.\n\nSigned-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n---\n compat/posix.h | 16 +++++++++-------\n 1 file changed, 9 insertions(+), 7 deletions(-)\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex ffdfd91c7b..deefc43f28 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -4,22 +4,24 @@\n #define _FILE_OFFSET_BITS 64\n \n /*\n- * Derived from Linux \"Features Test Macro\" header\n- * Convenience macros to test the versions of gcc (or\n- * a compatible compiler).\n+ * Convenience macros to test the versions of GCC (or a compatible compiler).\n  * Use them like this:\n  *  #if GIT_GNUC_PREREQ (2,8)\n- *   ... code requiring gcc 2.8 or later ...\n+ *   ... code requiring GCC 2.8 or later ...\n  *  #endif\n  *\n+ * Note that Clang and other compilers define __GNUC__ for compatibility; use\n+ * GIT_CLANG_PREREQ() to check for specific Clang versions.\n+ *\n  * This macro of course is not part of POSIX, but we need it for the UNUSED\n  * macro which is used by some of our POSIX compatibility wrappers.\n-*/\n+ */\n #if defined(__GNUC__) && defined(__GNUC_MINOR__)\n # define GIT_GNUC_PREREQ(maj, min) \\\n-\t((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))\n+\t((__GNUC__ > (maj)) || \\\n+\t (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min)))\n #else\n- #define GIT_GNUC_PREREQ(maj, min) 0\n+# define GIT_GNUC_PREREQ(maj, min) 0\n #endif\n \n /* Similar for Clang. */\n-- \n2.54.0\n\n"},{"id":"545375","messageId":"aiwJSBfRbUFZ70gP@pks.im","threadId":"65582","inReplyTo":"20260608124419.38905-2-dominik.loidolt@univie.ac.at","subject":"Re: [PATCH v3 2/2] compat/posix.h: simplify GIT_GNUC_PREREQ() comparison","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-06-12T13:27:36Z","receivedAt":"2026-06-12T13:27:43Z","isPatch":true,"body":"On Mon, Jun 08, 2026 at 02:44:19PM +0200, Dominik Loidolt wrote:\n> Replace the glibc-style bit-shift version comparison with an explicit\n> major/minor comparison. This is easier to read and is consistent with\n> the format already used by GIT_CLANG_PREREQ() and many BSD\n\nIt's a bit funny to use `GIT_CLANG_PREREQ()` as an argument here as\nwe've just added it in the preceding commit.\n\n> <sys/cdefs.h> headers.\n> \n> This has no runtime impact, as the macro is evaluated at compile time.\n> It is also more future-proof, as it no longer assumes that GCC version\n> components stay below 65536.\n\nI feel like all the message needs to say is \"let's do it for\nconsistency, and it's easier to read\". That would've been sufficient,\nwhereas this argument here feels a bit thin.\n\nDoesn't matter much though, and I think ultimately the message is fine\nas-is, even though the reasoning is a bit funny.\n\n> diff --git a/compat/posix.h b/compat/posix.h\n> index ffdfd91c7b..deefc43f28 100644\n> --- a/compat/posix.h\n> +++ b/compat/posix.h\n> @@ -4,22 +4,24 @@\n>  #define _FILE_OFFSET_BITS 64\n>  \n>  /*\n> - * Derived from Linux \"Features Test Macro\" header\n> - * Convenience macros to test the versions of gcc (or\n> - * a compatible compiler).\n> + * Convenience macros to test the versions of GCC (or a compatible compiler).\n>   * Use them like this:\n>   *  #if GIT_GNUC_PREREQ (2,8)\n> - *   ... code requiring gcc 2.8 or later ...\n> + *   ... code requiring GCC 2.8 or later ...\n>   *  #endif\n>   *\n> + * Note that Clang and other compilers define __GNUC__ for compatibility; use\n> + * GIT_CLANG_PREREQ() to check for specific Clang versions.\n> + *\n>   * This macro of course is not part of POSIX, but we need it for the UNUSED\n>   * macro which is used by some of our POSIX compatibility wrappers.\n> -*/\n> + */\n\nIt would've been nice to either move these changes into a preparatory\ncommit or at least mention them \n\n>  #if defined(__GNUC__) && defined(__GNUC_MINOR__)\n>  # define GIT_GNUC_PREREQ(maj, min) \\\n> -\t((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))\n> +\t((__GNUC__ > (maj)) || \\\n> +\t (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min)))\n>  #else\n> - #define GIT_GNUC_PREREQ(maj, min) 0\n> +# define GIT_GNUC_PREREQ(maj, min) 0\n>  #endif\n\nThe change itself makes sense to me.\n\nI'm not sure myself whether this could use another reroll. It's all just\nnits, and the intent is clear enough.\n\nThanks!\n\nPatrick\n"},{"id":"545412","messageId":"aixYPxWiWO9iryKl@eduroam-077-080-003-247.wlan.univie.ac.at","threadId":"65582","inReplyTo":"aiwJSBfRbUFZ70gP@pks.im","subject":"Re: [PATCH v3 2/2] compat/posix.h: simplify GIT_GNUC_PREREQ() comparison","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-12T19:04:31Z","receivedAt":"2026-06-12T19:05:04Z","isPatch":true,"body":"Thanks again for taking the time to review my contribution.\n\nOn Fri, Jun 12, 2026 at 03:27:36PM +0200, Patrick Steinhardt wrote:\n> > It is also more future-proof, as it no longer assumes that GCC version\n> > components stay below 65536.\n>\n> I feel like all the message needs to say is \"let's do it for\n> consistency, and it's easier to read\". That would've been sufficient,\n> whereas this argument here feels a bit thin.\n\nAgreed. I'll simplify the commit message. The \"future-proof\" bit was a joke I\njust couldn't resist, but it may cause more confusion than it is worth.\nI'll drop it.\n\n> It would've been nice to either move these changes into a preparatory\n> commit or at least mention them\n\nAgreed. I'll split the cleanup into a separate commit.\n\n> I'm not sure myself whether this could use another reroll. It's all just\n> nits, and the intent is clear enough.\n\nI think it's worth rerolling.\n\nThanks,\n Dominik\n"},{"id":"545445","messageId":"20260613122711.38662-1-dominik.loidolt@univie.ac.at","threadId":"65582","inReplyTo":"20260608124419.38905-1-dominik.loidolt@univie.ac.at","subject":"[PATCH v4 0/3] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-13T12:27:08Z","receivedAt":"2026-06-13T12:28:05Z","isPatch":true,"body":"This series enables the intended UNUSED warning message with Clang by\nadding a dedicated Clang version check. It also cleans up the nearby\nGIT_GNUC_PREREQ() and UNUSED macros.\n\nChanges since v3:\n- split style-only cleanups into their own patch\n- fix the UNUSED preprocessor indentation style\n- simplify the GIT_GNUC_PREREQ() comparison commit message\n- keep the Clang-specific note in the patch that adds GIT_CLANG_PREREQ()\n\nThanks,\n Dominik\n\nDominik Loidolt (3):\n  compat/posix.h: enable UNUSED warning messages for Clang\n  compat/posix.h: clean up GIT_GNUC_PREREQ() and UNUSED\n  compat/posix.h: simplify GIT_GNUC_PREREQ() comparison\n\n compat/posix.h | 35 +++++++++++++++++++++++------------\n 1 file changed, 23 insertions(+), 12 deletions(-)\n\nRange-diff against v3:\n1:  62f5bce297 ! 1:  9ec87cd815 compat/posix.h: enable UNUSED warning messages for Clang\n    @@ Commit message\n         Signed-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n\n      ## compat/posix.h ##\n    +@@\n    +  *   ... code requiring gcc 2.8 or later ...\n    +  *  #endif\n    +  *\n    ++ * Note that Clang and other compilers define __GNUC__ for compatibility; use\n    ++ * GIT_CLANG_PREREQ() to check for specific Clang versions.\n    ++ *\n    +  * This macro of course is not part of POSIX, but we need it for the UNUSED\n    +  * macro which is used by some of our POSIX compatibility wrappers.\n    + */\n     @@\n       #define GIT_GNUC_PREREQ(maj, min) 0\n      #endif\n2:  a8fe5047a4 ! 2:  1a695af9ca compat/posix.h: simplify GIT_GNUC_PREREQ() comparison\n    @@ Metadata\n     Author: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n\n      ## Commit message ##\n    -    compat/posix.h: simplify GIT_GNUC_PREREQ() comparison\n    +    compat/posix.h: clean up GIT_GNUC_PREREQ() and UNUSED\n\n    -    Replace the glibc-style bit-shift version comparison with an explicit\n    -    major/minor comparison. This is easier to read and is consistent with\n    -    the format already used by GIT_CLANG_PREREQ() and many BSD\n    -    <sys/cdefs.h> headers.\n    +    Fix the preprocessor indentation of the GIT_GNUC_PREREQ() and UNUSED\n    +    macros according to the CodingGuidelines, without changing their\n    +    behavior.\n\n    -    This has no runtime impact, as the macro is evaluated at compile time.\n    -    It is also more future-proof, as it no longer assumes that GCC version\n    -    components stay below 65536.\n    +    Adjust the spelling in the GIT_GNUC_PREREQ() comment block.\n\n         Signed-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n\n      ## compat/posix.h ##\n     @@\n    - #define _FILE_OFFSET_BITS 64\n\n      /*\n    -- * Derived from Linux \"Features Test Macro\" header\n    +  * Derived from Linux \"Features Test Macro\" header\n     - * Convenience macros to test the versions of gcc (or\n     - * a compatible compiler).\n     + * Convenience macros to test the versions of GCC (or a compatible compiler).\n    @@ compat/posix.h\n     + *   ... code requiring GCC 2.8 or later ...\n       *  #endif\n       *\n    -+ * Note that Clang and other compilers define __GNUC__ for compatibility; use\n    -+ * GIT_CLANG_PREREQ() to check for specific Clang versions.\n    -+ *\n    +  * Note that Clang and other compilers define __GNUC__ for compatibility; use\n    +@@\n    +  *\n       * This macro of course is not part of POSIX, but we need it for the UNUSED\n       * macro which is used by some of our POSIX compatibility wrappers.\n     -*/\n     + */\n      #if defined(__GNUC__) && defined(__GNUC_MINOR__)\n      # define GIT_GNUC_PREREQ(maj, min) \\\n    --\t((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))\n    -+\t((__GNUC__ > (maj)) || \\\n    -+\t (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min)))\n    + \t((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))\n      #else\n     - #define GIT_GNUC_PREREQ(maj, min) 0\n     +# define GIT_GNUC_PREREQ(maj, min) 0\n      #endif\n\n      /* Similar for Clang. */\n    +@@\n    +  * compilation, consider using MAYBE_UNUSED instead.\n    +  */\n    + #if GIT_GNUC_PREREQ(4, 5) || GIT_CLANG_PREREQ(2, 9)\n    +-#define UNUSED __attribute__((unused)) \\\n    +-\t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n    ++# define UNUSED __attribute__((unused)) \\\n    ++\t__attribute__((deprecated(\"parameter declared as UNUSED\")))\n    + #elif defined(__GNUC__)\n    +-#define UNUSED __attribute__((unused)) \\\n    ++# define UNUSED __attribute__((unused)) \\\n    + \t__attribute__((deprecated))\n    + #else\n    +-#define UNUSED\n    ++# define UNUSED\n    + #endif\n    +\n    + #ifdef __MINGW64__\n-:  ---------- > 3:  289b7d9f8e compat/posix.h: simplify GIT_GNUC_PREREQ() comparison\n\nbase-commit: a89346e34a937f001e5d397ee62224e3e9852040\n--\n2.54.0\n\n"},{"id":"545446","messageId":"20260613122711.38662-3-dominik.loidolt@univie.ac.at","threadId":"65582","inReplyTo":"20260613122711.38662-1-dominik.loidolt@univie.ac.at","subject":"[PATCH v4 2/3] compat/posix.h: clean up GIT_GNUC_PREREQ() and UNUSED","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-13T12:27:10Z","receivedAt":"2026-06-13T12:28:05Z","isPatch":true,"body":"Fix the preprocessor indentation of the GIT_GNUC_PREREQ() and UNUSED\nmacros according to the CodingGuidelines, without changing their\nbehavior.\n\nAdjust the spelling in the GIT_GNUC_PREREQ() comment block.\n\nSigned-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n---\n compat/posix.h | 17 ++++++++---------\n 1 file changed, 8 insertions(+), 9 deletions(-)\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex 273cb87101..d2de5cedf5 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -5,11 +5,10 @@\n \n /*\n  * Derived from Linux \"Features Test Macro\" header\n- * Convenience macros to test the versions of gcc (or\n- * a compatible compiler).\n+ * Convenience macros to test the versions of GCC (or a compatible compiler).\n  * Use them like this:\n  *  #if GIT_GNUC_PREREQ (2,8)\n- *   ... code requiring gcc 2.8 or later ...\n+ *   ... code requiring GCC 2.8 or later ...\n  *  #endif\n  *\n  * Note that Clang and other compilers define __GNUC__ for compatibility; use\n@@ -17,12 +16,12 @@\n  *\n  * This macro of course is not part of POSIX, but we need it for the UNUSED\n  * macro which is used by some of our POSIX compatibility wrappers.\n-*/\n+ */\n #if defined(__GNUC__) && defined(__GNUC_MINOR__)\n # define GIT_GNUC_PREREQ(maj, min) \\\n \t((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))\n #else\n- #define GIT_GNUC_PREREQ(maj, min) 0\n+# define GIT_GNUC_PREREQ(maj, min) 0\n #endif\n \n /* Similar for Clang. */\n@@ -48,13 +47,13 @@\n  * compilation, consider using MAYBE_UNUSED instead.\n  */\n #if GIT_GNUC_PREREQ(4, 5) || GIT_CLANG_PREREQ(2, 9)\n-#define UNUSED __attribute__((unused)) \\\n-\t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n+# define UNUSED __attribute__((unused)) \\\n+\t__attribute__((deprecated(\"parameter declared as UNUSED\")))\n #elif defined(__GNUC__)\n-#define UNUSED __attribute__((unused)) \\\n+# define UNUSED __attribute__((unused)) \\\n \t__attribute__((deprecated))\n #else\n-#define UNUSED\n+# define UNUSED\n #endif\n \n #ifdef __MINGW64__\n-- \n2.54.0\n\n"},{"id":"545447","messageId":"20260613122711.38662-2-dominik.loidolt@univie.ac.at","threadId":"65582","inReplyTo":"20260613122711.38662-1-dominik.loidolt@univie.ac.at","subject":"[PATCH v4 1/3] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-13T12:27:09Z","receivedAt":"2026-06-13T12:28:05Z","isPatch":true,"body":"Use a dedicated Clang version check for the UNUSED macro.\n\nCommit 7c07f36ad2 (git-compat-util.h: GCC deprecated message arg only in\nGCC 4.5+, 2022-10-05) restricted use of the deprecated attribute's\nmessage argument in the UNUSED macro to GCC 4.5 or newer.\n\nClang identifies itself as GNUC 4.2.1 for compatibility, so\nGIT_GNUC_PREREQ(4, 5) does not detect whether Clang supports the\ndeprecated(\"...\") form. Add GIT_CLANG_PREREQ() macro and use it to\nenable the UNUSED warning message for Clang 2.9 and newer.\n\nSigned-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n---\n compat/posix.h | 14 +++++++++++++-\n 1 file changed, 13 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex faaae1b655..273cb87101 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -12,6 +12,9 @@\n  *   ... code requiring gcc 2.8 or later ...\n  *  #endif\n  *\n+ * Note that Clang and other compilers define __GNUC__ for compatibility; use\n+ * GIT_CLANG_PREREQ() to check for specific Clang versions.\n+ *\n  * This macro of course is not part of POSIX, but we need it for the UNUSED\n  * macro which is used by some of our POSIX compatibility wrappers.\n */\n@@ -22,6 +25,15 @@\n  #define GIT_GNUC_PREREQ(maj, min) 0\n #endif\n \n+/* Similar for Clang. */\n+#if defined(__clang__) && defined(__clang_minor__) && defined(__clang_major__)\n+# define GIT_CLANG_PREREQ(maj, min) \\\n+\t((__clang_major__ > (maj)) || \\\n+\t (__clang_major__ == (maj) && __clang_minor__ >= (min)))\n+#else\n+# define GIT_CLANG_PREREQ(maj, min) 0\n+#endif\n+\n /*\n  * UNUSED marks a function parameter that is always unused.  It also\n  * can be used to annotate a function, a variable, or a type that is\n@@ -35,7 +47,7 @@\n  * When a parameter may be used or unused, depending on conditional\n  * compilation, consider using MAYBE_UNUSED instead.\n  */\n-#if GIT_GNUC_PREREQ(4, 5)\n+#if GIT_GNUC_PREREQ(4, 5) || GIT_CLANG_PREREQ(2, 9)\n #define UNUSED __attribute__((unused)) \\\n \t__attribute__((deprecated (\"parameter declared as UNUSED\")))\n #elif defined(__GNUC__)\n-- \n2.54.0\n\n"},{"id":"545448","messageId":"20260613122711.38662-4-dominik.loidolt@univie.ac.at","threadId":"65582","inReplyTo":"20260613122711.38662-1-dominik.loidolt@univie.ac.at","subject":"[PATCH v4 3/3] compat/posix.h: simplify GIT_GNUC_PREREQ() comparison","fromName":"Dominik Loidolt","fromEmail":"dominik.loidolt@univie.ac.at","sentAt":"2026-06-13T12:27:11Z","receivedAt":"2026-06-13T12:28:05Z","isPatch":true,"body":"GIT_GNUC_PREREQ() uses a glibc-style bit-shift version comparison,\nwhich is harder to read than an explicit major/minor comparison.\n\nUse an explicit comparison, as in many BSD <sys/cdefs.h> headers, and\ndrop the Linux header attribution comment because it no longer applies.\n\nSigned-off-by: Dominik Loidolt <dominik.loidolt@univie.ac.at>\n---\n compat/posix.h | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex d2de5cedf5..2f01564b0d 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -4,7 +4,6 @@\n #define _FILE_OFFSET_BITS 64\n \n /*\n- * Derived from Linux \"Features Test Macro\" header\n  * Convenience macros to test the versions of GCC (or a compatible compiler).\n  * Use them like this:\n  *  #if GIT_GNUC_PREREQ (2,8)\n@@ -19,7 +18,8 @@\n  */\n #if defined(__GNUC__) && defined(__GNUC_MINOR__)\n # define GIT_GNUC_PREREQ(maj, min) \\\n-\t((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))\n+\t((__GNUC__ > (maj)) || \\\n+\t (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min)))\n #else\n # define GIT_GNUC_PREREQ(maj, min) 0\n #endif\n-- \n2.54.0\n\n"},{"id":"545462","messageId":"xmqqse6qe6oo.fsf@gitster.g","threadId":"65582","inReplyTo":"20260613122711.38662-1-dominik.loidolt@univie.ac.at","subject":"Re: [PATCH v4 0/3] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-06-13T16:39:03Z","receivedAt":"2026-06-13T16:39:06Z","isPatch":true,"body":"Dominik Loidolt <dominik.loidolt@univie.ac.at> writes:\n\n> This series enables the intended UNUSED warning message with Clang by\n> adding a dedicated Clang version check. It also cleans up the nearby\n> GIT_GNUC_PREREQ() and UNUSED macros.\n>\n> Changes since v3:\n> - split style-only cleanups into their own patch\n> - fix the UNUSED preprocessor indentation style\n> - simplify the GIT_GNUC_PREREQ() comparison commit message\n> - keep the Clang-specific note in the patch that adds GIT_CLANG_PREREQ()\n>\n> Thanks,\n>  Dominik\n>\n> Dominik Loidolt (3):\n>   compat/posix.h: enable UNUSED warning messages for Clang\n>   compat/posix.h: clean up GIT_GNUC_PREREQ() and UNUSED\n>   compat/posix.h: simplify GIT_GNUC_PREREQ() comparison\n\nLooking good and all the points Patrick raised during the review of\nthe previous round seem to have been addressed nicely.\n\nWill replace.  Shall we mark it for 'next' now?\n\nThanks.\n"},{"id":"545530","messageId":"ai-8Y1r9zbWfdY8p@pks.im","threadId":"65582","inReplyTo":"xmqqse6qe6oo.fsf@gitster.g","subject":"Re: [PATCH v4 0/3] compat/posix.h: enable UNUSED warning messages for Clang","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-06-15T08:48:35Z","receivedAt":"2026-06-15T08:48:42Z","isPatch":true,"body":"On Sat, Jun 13, 2026 at 09:39:03AM -0700, Junio C Hamano wrote:\n> Dominik Loidolt <dominik.loidolt@univie.ac.at> writes:\n> \n> > This series enables the intended UNUSED warning message with Clang by\n> > adding a dedicated Clang version check. It also cleans up the nearby\n> > GIT_GNUC_PREREQ() and UNUSED macros.\n> >\n> > Changes since v3:\n> > - split style-only cleanups into their own patch\n> > - fix the UNUSED preprocessor indentation style\n> > - simplify the GIT_GNUC_PREREQ() comparison commit message\n> > - keep the Clang-specific note in the patch that adds GIT_CLANG_PREREQ()\n> >\n> > Thanks,\n> >  Dominik\n> >\n> > Dominik Loidolt (3):\n> >   compat/posix.h: enable UNUSED warning messages for Clang\n> >   compat/posix.h: clean up GIT_GNUC_PREREQ() and UNUSED\n> >   compat/posix.h: simplify GIT_GNUC_PREREQ() comparison\n> \n> Looking good and all the points Patrick raised during the review of\n> the previous round seem to have been addressed nicely.\n> \n> Will replace.  Shall we mark it for 'next' now?\n\nYeah, I'm happy with this version. Thanks!\n\nPatrick\n"}]}