The confusion (I dare not call it a flame war) is arising out of the
difference between an object with all bits zero and a 0 constant (or
equivalently 2*0 or 3-3 or what not). 0 in pointer context is always a
null pointer, but it may or may not be all-bits-zero. 0 in integer context
is, on any sane machine, all-bits-zero (on 1's-complement machines it may
also be all-bits-one).
Personally, when I was programming in C I defined a macro #define
NULLPTR(t) ((t)0), so that I would write NULLPTR(char *) or NULLPTR(int *)
or whatever the Right Thing was.
On Sun, Sep 20, 2020 at 6:16 PM Clem Cole <clemc(a)ccc.com> wrote:
On Sun, Sep 20, 2020 at 4:59 PM Steve Nickolas <usotsuki(a)buric.co> wrote:
I was under the impression that there was
explicitly no requirement that
a
null pointer be 0,
Indeed, section 7.19 states it is *implementation-defined*. See my
previous message.