Hi Lasse,

Your change[1] unfortunately did not suffice to get groff building on
Debian oldoldstable with glibc 2.31 and clang 11.0.

It seems that glibc 2.31 defines only a 2-argument form of
`static_assert`,[2] Gnulib uses a 1-argument form of it no matter what
version of the C language has been requested.

So I've had to apply the attached patch to groff's "gnulib" submodule
to support build with either GCC or Clang and `-std=c99`.

With this patch, both compilers work to produce a successful build.

Regards,
Branden

[1]

commit de0e0b699ac8a434e346b046e8b13e9612fc4b7b
Author: Lasse Collin <[email protected]>
Date:   Sat Aug 8 13:30:08 2026 +0300

    verify: Fix single-argument static_assert with glibc in C89 & C99 modes

    * lib/verify.h: glibc's <sys/cdefs.h> may define _Static_assert
    with two arguments when the compiler is in C89 or C99 mode.
    Undefine it so that Gnulib's own version is used instead.
    Reported by G. Branden Robinson in
    <https://lists.gnu.org/archive/html/bug-gnulib/2026-08/msg00125.html>.

    Copyright-paperwork-exempt: Yes
commit 1c2f5b688d56d0326e6998fd9b411aed68fedf7b
Author: G. Branden Robinson <[email protected]>
Date:   Thu Sep 3 03:48:44 2026 -0500

    lib/malloca.c: Work with C99 `static_assert`.
    
    Single-argument `static_assert` is an ISO C11 feature.  Support projects
    that use ISO C99.

diff --git a/lib/malloca.c b/lib/malloca.c
index 943140c83e..8c50a4466d 100644
--- a/lib/malloca.c
+++ b/lib/malloca.c
@@ -46,7 +46,8 @@ typedef uintptr_t small_t;
 /* Type for holding very small pointer differences.  */
 typedef unsigned char small_t;
 /* Verify that it is wide enough.  */
-static_assert (2 * sa_alignment_max - 1 <= (small_t) -1);
+static_assert (2 * sa_alignment_max - 1 <= (small_t) -1,
+               "system maximum alignment is too wide for this malloc");
 #endif
 
 void *

Attachment: signature.asc
Description: PGP signature

Reply via email to