coreutils
[Top][All Lists]
Advanced

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

recent nullptr related changes


From: Pádraig Brady
Subject: recent nullptr related changes
Date: Fri, 16 Jan 2026 11:47:11 +0000
User-agent: Mozilla Thunderbird Beta

Hi Paul.

I noticed a recent change to gnulib to turn on
-Wzero-as-null-pointer-constant for C (not just for C++):
https://github.com/coreutils/gnulib/commit/287a7b35
The implications of that are, any gnulib using project
will fail with GCC < 15 (released April 2025) with:

  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?


Also I noticed the reintroduction of NULL in coreutils since:
https://github.com/coreutils/coreutils/commit/1202fac2
with the referenced (good) justification of https://bugs.gnu.org/66221#53
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.

thanks,
Padraig



reply via email to

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