Article View: comp.std.c
Article #4412Re: null pointer constant
From: Larry Weiss
Date: Thu, 30 Nov 1995 19:39
Date: Thu, 30 Nov 1995 19:39
25 lines
1761 bytes
1761 bytes
Denizen of the Deep wrote: > >Denizen of the Deep (becker@Xenon.Stanford.EDU) wrote: > >|> If the type (void *) is not compatible with pointer-to-function > >|> types, then why is the expression (void *)0 a legal null > >|> pointer constant? > >|> Since the null pointer constant is assignable to a pointer-to- > >|> function, it seems that this is rather misleading. > > ... I understand that calling 0 a null pointer constant is > just a special case. My point is not to ask "why should (void *)0 fit > in the type system?" As you point out, the standard just declares it > by fiat. My point is to ask "Isn't this misleading?" Questions concerning the human-factors aspect of the language C don't get much attention here (I don't know if that's appropriate or not). If something is considered "misleading" by some, that's less important than if something is found rigorously ambiguous, given the text of the Standard. I suppose it's kind of like arguing about why the spelling rules, and exceptions of a natural language like English are not rational...it just goes nowhere, as no one can change it. It's enough to list it as an exception, and pray that the list of such exceptions is a small one.
Technical Details
Message-ID:
<30BE0855.3FF4@oc.com>Path:
arc1-ca.pugleaf.net!hermes.oc.com!usenetReferences:
<49b202$62t@nntp.Stanford.EDU> <49c2hj$o7j@gabi.gabi-soft.fr> <49cvna$ir7@nntp.Stanford.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!hermes.oc.com!usenet From: Larry Weiss <lfw@oc.com> Newsgroups: comp.std.c Subject: Re: null pointer constant Date: Thu, 30 Nov 1995 11:39:01 -0800 Organization: OpenConnect Systems, Dallas, TX, USA Message-ID: <30BE0855.3FF4@oc.com> References: <49b202$62t@nntp.Stanford.EDU> <49c2hj$o7j@gabi.gabi-soft.fr> <49cvna$ir7@nntp.Stanford.EDU> NNTP-Posting-Host: ocs2228.oc.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0b3 (Win16; I)