coreutils
[Top][All Lists]
Advanced

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

Re: recent nullptr related changes


From: Paul Eggert
Subject: Re: recent nullptr related changes
Date: Fri, 16 Jan 2026 13:02:51 -0800
User-agent: Mozilla Thunderbird

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.


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.

Attachment: 0001-manywarnings-omit-new-C-warning-for-GCC-15.patch
Description: Text Data


reply via email to

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