P
pm940
Hello.
I've been reading some past discussions on the NULL vs. zero.
References are always made to systems or machienes that use values
other than zero to represent the NULL pointer.
Although not a practice I follow, there are no doubt millions of lines
of open source libraries and applications that do things like:
p = malloc(...);
if (!p)
fail.
Which is obviously a bad thing on non-zero NULL machines.
Can anybody provide specific examples of modern machines/systems be
them embedded or supercomputer where NULL is not zero?
The standard says what the standard says and I don't want to debate it.
Rather, I want to find counter-examples to prove that the standard's
language still relevant.
Thanks,
Paul.
I've been reading some past discussions on the NULL vs. zero.
References are always made to systems or machienes that use values
other than zero to represent the NULL pointer.
Although not a practice I follow, there are no doubt millions of lines
of open source libraries and applications that do things like:
p = malloc(...);
if (!p)
fail.
Which is obviously a bad thing on non-zero NULL machines.
Can anybody provide specific examples of modern machines/systems be
them embedded or supercomputer where NULL is not zero?
The standard says what the standard says and I don't want to debate it.
Rather, I want to find counter-examples to prove that the standard's
language still relevant.
Thanks,
Paul.