[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: Bruno Haible
Subject: Re: macOS 12.6.3, static_assert, and vasnprintf compilation failure
Date: Tue, 07 Feb 2023 15:13:28 +0100

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

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.



reply via email to

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