[TUHS] reviving a bit of WWB
Doug McIlroy
doug at cs.dartmouth.edu
Mon Sep 21 06:57:59 AEST 2020
>> (Of course, that assumes NULL is 0, but I don't think I've run into any
>> architecture so braindead as to not have NULL=0.)
>
> It has nothing to do with machine architecture. The C standard
> says 0 coerces to the null pointer. NULL, defined in <stddef.h>,
> is part of the library, not the language.
To put it more strongly. this is not a legal C source file.
char *s = NULL;
But this is.
char *s = 0;
Doug
More information about the TUHS
mailing list