Post Syndicated from original https://lwn.net/Articles/930899/
The Red Hat Developer site has an
overview of some of the new C-language features supported by the
GCC 13 release.
The nullptr constant first appeared in C++11, described in
proposal N2431 from 2007. Its purpose was to alleviate the problems
with the definition of NULL, which can be defined in a
variety of ways: (void *)0 (a pointer constant),
0 (an integer), and so on. This posed problems for
overload resolution, generic programming, etc. While C doesn’t have
function overloading, the protean definition of NULL still
causes headaches.