On 2026-08-07 Paul Eggert wrote:
> On 8/7/26 03:25, Lasse Collin wrote:
> > From groff-1.25.0.rc2/configure.ac:
> >
> > # Autoconf [2.70,2.72] tries to cram C11 and C++11 down our
> > throats. We # don't (yet) want them.
> > ac_cv_prog_cc_c11=no
>
> Perhaps the problem goes away if Autoconf 2.73 is used? That might be
> the simplest fix.
The default Clang version is 11 on Debian 11. It doesn't support
-std=gnu23. Clang 11 defaults to -std=gnu17.
With the rc2 tarball (Autoconf 2.69), configuring with CC=clang
CXX=clang++ results in a successful build even though the check for
-std=gnu11 is skipped due to ac_cv_prog_cc_c11=no in configure.ac. It's
because the compiler is in GNU C17 mode by default.
Configuring with CC='clang -std=gnu99' reproduces the error. This
happens with Autoconf 2.73 too:
- The check for -std=gnu23 fails because it's not supported by
Clang 11. There is no ac_cv_prog_cc_c23=no in configure.ac that
would force skipping of this check.
- The check for -std=gnu11 is skipped due to ac_cv_prog_cc_c11=no
in configure.ac.
Gnulib's <assert.h> doesn't support C23's single-argument syntax if
compiler is successfully forced into -std=gnu99, and one is using old
enough glibc where <sys/cdefs.h> defines _Static_assert with Clang. I
don't know if this even needs to work because without
ac_cv_prog_cc_c23=no the compiler would be in GNU C11/C17 mode.
--
Lasse Collin