On 24.02.2020 21:18, Mouse wrote:
If we use 0x0, it can be a valid pointer.
If we use NULL, it's not expected to work and will eventually
generate a syntax erro.
Then someone has severely broken compatability with older versions of
C. 0x0 and (when one of the suitable #includes has been done) NULL
have both historically been perfectly good null pointer constants.
Also...syntax error? Really? _Syntax_ error?? I'd really like to see
what they've done to the grammar to lead to that; I'm having trouble
imagining how that would be done.
The process of evaluation of the NULL semantics is not a recent thing.
Not so long time, still in the NetBSD times, it was a general practice
to allow dereferencing the NULL pointer and expect zeroed bytes over there.
We still maintain compatibility with this behavior (originated as a hack
in PDP11) in older NetBSD releases (NetBSD-0.9 Franz Lisp binaries
depend on this).