negative addresses

Doug Gwyn gwyn at brl-smoke.ARPA
Thu May 19 00:25:45 AEST 1988


In article <10001 at tekecs.TEK.COM> andrew at frip.gwd.tek.com (Andrew Klossner) writes:
-Doug Gwyn (gwyn at brl-smoke.ARPA) writes:
->> Unfortunately, it is a real problem, because there are zillions of
->> programs that implicitly assume that [null] pointers are all-zeros.
-> I don't think this is true.  How about an example?
-		if (tbuf->c_ptr)
-		if (tbuf->c_ptr == NULL)
-		if (tp->t_rbuf.c_ptr) {
-		if (tp->t_tbuf.c_ptr) {

None of these are non-portable uses of C; none of them depend on
null pointers being represented by all-zero data.

I'm still waiting for an example...



More information about the Comp.lang.c mailing list