pointers, tests, casts

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Dec 3 00:51:54 AEST 1988


In article <44100016 at hcx3> shirono at hcx3.SSD.HARRIS.COM writes:
>Even in the K&R1 days, the only valid definition of NULL has been
>#define NULL 0

True of pre-ANSI C, but an ANSI C implementation can use either that
definition or
#define NULL ((void*)0)
I recommend the former even for ANSI C implementations.  The added
complexity buys just one thing, which is possible type mismatch
checking, but I don't think that is significant enough to justify
the change.



More information about the Comp.lang.c mailing list