On Mon, Feb 06, 2023 at 04:22:46PM -0500, Jeffrey Walton wrote: > On Sun, Feb 5, 2023 at 9:45 PM Paul Eggert <egg...@cs.ucla.edu> wrote: > > > > On 2023-02-05 18:00, Bruno Haible wrote: > > > Why call it 'c-nullptr', not 'nullptr'? > > > > I was worried about C++, not that I know much about it, and operated by > > analogy with the name of m4/c-bool.m4. If 'nullptr' is a better name > > then let's switch to it. I assume we'd also switch the file names, the > > macro names, etc. > > In C++, nullptr is not convertible to an integral. So this no longer > causes confusion: > > g(void*); > g(int); > > g(nullptr) will always match g(void*). g(int) will never be matched, > which could happen with g(NULL).
As compilers C++ compilers get stricter, more and more old C++ code breaks due to NULL being of wrong type. I did quite a bit of patching of such code replacing NULL with nullptr in the last few years. Dima