[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: macOS 12.6.3, static_assert, and vasnprintf compilation failure

From: Alejandro Colomar
Subject: Re: macOS 12.6.3, static_assert, and vasnprintf compilation failure
Date: Tue, 7 Feb 2023 15:20:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

Hi Bruno and Branden,

On 2/7/23 15:13, Bruno Haible wrote:
G. Branden Robinson wrote:
groff's had an assert.h header
since version 1.01 (1991), but I don't know why.  In 2020 I expanded it
to support C99-style assertions (i.e., assertions that communicate
meaning instead of the nearly useless form from C89).  I am trying to
not require C99 features; we can do without variable-length arrays and
complex numbers.  But as a developer I insist on C99 assertions.

The Gnulib manual [1] explains that Gnulib essentially assumes C99
already. I still have access to a machine with a pre-C99 compiler,
but I don't use it for testing any more, since there's no point in
using a 20-years old compiler that would barf on 50% of the source


I suggest declaring C89 a unsupported language version, and requiring a minimum of C99 (if not C11). I worked on upgrading shadow-utils recently from C89 to C11, so I may help if you need some help.


We haven't tested the behaviour of <assert.h> in detail, but you're
*very* likely to get the C99 assertions that you want everywhere.

might require #include_next

Note that #include_next requires GCC or clang. So it is much more
of a portability constraint than merely requiring C99 or newer.

   - How about removing groff's src/include/assert.h and just rely
     on the one from the system?


   - If that does not work out, how about putting the src/include/assert.h
     into a different directory and adjust the -I options, so that
     the Gnulib compilation units will not see it? Only the groff C++ code
     would see it.

Yep, I suggest using src/include/groff/ as a root for all groff includes, and use -I src/include, so that you need to include groff's headers as "groff/...", which can't collide with anything else.





GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]