Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: Do nil pointers convert to nil pointers?
Message-ID: <1991Mar20.174710.4405@zoo.toronto.edu>
Date: Wed, 20 Mar 1991 17:47:10 GMT
References: <1991Mar19.234219.22867@cbnewsj.att.com>
Organization: U of Toronto Zoology

In article <1991Mar19.234219.22867@cbnewsj.att.com> asd@cbnewsj.att.com (Adam S. Denton) writes:
>When generic_func is called, the nil (T *) argument x will be converted
>to (void *) before generic_func gets it.  My question is, is this
>guaranteed to produce a *nil* generic pointer, or not?  In other words,
>does ANSI guarantee that (void *)0 compares equal to (void *)(T *)0...

(Point of terminology:  there is no such thing as "nil" in C.  You are
talking about null pointers.)

ANSI C guarantees that a null pointer of one type, converted to another
type, is a null pointer of the new type.
-- 
"[Some people] positively *wish* to     | Henry Spencer @ U of Toronto Zoology
believe ill of the modern world."-R.Peto|  henry@zoo.toronto.edu  utzoo!henry
