🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3231

Re: gcc and NULL function pointers.

#3231
From: Blair P. Houghton
Date: Fri, 28 Jun 1991 02:39
17 lines
1313 bytes
In article <1991Jun27.190107.627@cirrus.com> dhesi@cirrus.com (Rahul Dhesi) writes:
>And the bottom line:
>
>     All definitions of NULL other than 0 are wrong, no matter how
>     much or how little ANSI-conformant they may be.

Well, no, they aren't "wrong", they're just redundant, because
it is true in all cases that the only "right" way to _use_ NULL
is to cast it to a type compatible with the object, pointer, or
function parameter being set to or compared against NULL, and then
not to use it for anything but pointer types (which are explicitly
defined to be tolerant of wacky chains of casts of their null value).

				--Blair
				  "But this will have changed by the
				   next time I see this posting, so
				   I'm going to go take another nap..."
Technical Details
Message-ID: <4910@inews.intel.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!lll-winken!uunet!iWarp.intel.com!ichips!inews!pima!bhoughto
References: <16506@smoke.brl.mil> <17605.Jun2607.39.3591@kramden.acf.nyu.edu> <1991Jun27.190107.627@cirrus.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!lll-winken!uunet!iWarp.intel.com!ichips!inews!pima!bhoughto
From: bhoughto@pima.intel.com (Blair P. Houghton)
Newsgroups: comp.std.c
Subject: Re: gcc and NULL function pointers.
Message-ID: <4910@inews.intel.com>
Date: 28 Jun 91 02:39:31 GMT
References: <16506@smoke.brl.mil> <17605.Jun2607.39.3591@kramden.acf.nyu.edu> <1991Jun27.190107.627@cirrus.com>
Sender: news@inews.intel.com
Organization: Intel Corp, Chandler, AZ
Lines: 17