On 16/01/2026 21:02, Paul Eggert wrote:
On 2026-01-16 03:47, Pádraig Brady wrote:

    cc1: error: command-line option '-Wzero-as-null-pointer-constant'
    is valid for C++/ObjC++ but not for C [-Werror]

That's because the option is accepted, but always gives a warning.
I wonder should the gnulib manywarnings compat checking
always have -Werror enabled to auto remove such options
from use on unsupporting compilers?

That might be one way to go, though you'd need to test whether -Werror
works I suppose. I took a simpler way out, by looking at the GCC version
(which this code already does for other reasons) in the attached. This
patch also ports to Ubuntu GCC.

Cool, that also matches the Debian GCC version format,
though there was a typo breaking things for GCC 10,
which I just pushed a fix for.

The implication of that is, the sc_prohibit_NULL syntax check will fail.
I'll probably remove the syntax check anyway,
and possibly s/nullptr/NULL/ everywhere for consistency.

Both sound good to me, thanks.

I've also pushed a change to remove the syntax check,
and will probably s/nullptr/NULL/ everywhere for consistency
before the upcoming release.

thanks for the quick fixes!

Padraig

Reply via email to