bug-gnulib
[Top][All Lists]
Advanced

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

Gnulib and nullptr


From: Paul Eggert
Subject: Gnulib and nullptr
Date: Sun, 5 Feb 2023 14:16:39 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

To support an approximation to C23's nullptr keyword I installed the attached patch into Gnulib. To test it a bit I'm using the new c-nullptr module in GNU diffutils, by preferring nullptr to NULL in the diffutils source. See:

https://git.savannah.gnu.org/cgit/diffutils.git/commit/?id=09f8e2b0a92f3d25325f5b1df20384140261ee10

Assuming this works out, at some point I would like to change Gnulib itself to prefer nullptr to NULL, due to nullptr's somewhat-better properties. There's no rush of course.

With current c-nullptr Gnulib .h files would continue to use NULL rather than nullptr, since we couldn't assume client code includes a <config.h> that defines nullptr on pre-C23 platforms, so perhaps at some point that could be improved as well.

Attachment: 0001-c-nullptr-new-module.patch
Description: Text Data


reply via email to

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