My apologies to anyone who sees two versions of this message. I coughed
unexpectedly while drinking some milk, spewing milk everywhere, and
while I was cleaning up I apparently accidentally hit the "Post" button
on an incomplete version of this message.
The key point - the hard work associated with this proposal - will be
taking what the C++ standard says about nullptr, and figuring out how to
change the C standard to say something similar - ideally in a way that
is as compatible as possible with C++. This will get tricky, because
much of what it says about nullptr is said indirectly, through what it
says about prvalues and std::nullptr_t. It mentions std::nullptr_t in a
LOT of different places.
Consider a fully conforming implementation of C, and a fully-conforming
implementation of C++, which are as compatible with each other as is
permitted by both standards. I don't just mean that you can link code
written in the two languages by using "extern C" linkage appropriately
in the C++ code, though that is certainly implied. By compatible, I mean
that wherever there is a construct that is acceptable in both languages:
If the behavior of the construct according to either standard is
unspecified, each implementation makes a choice that's compatible with
that standard, if there is any such choice that is permitted by both
standards.
If either standard specifies that the behavior is implementation-
defined, both implementations make the same choice with regard to that
behavior, if there is any such choice that would be permitted by both
standards.
Currently, you can take almost any correct C program (as that term is
defined in 4p3 of the C standard), and with minor modifications, produce
a correct C program that is also well-formed C++ code, which will have
the same observable behavior with both of those compatible
implementations. Addition of nullptr to C should be done, if at all, in
a way that preserves this property.