Article View: gnu.misc.discuss
Article #74633Re: using 0 instead of NULL
From: Garrett Wollman
Date: Fri, 08 Mar 1991 17:10
Date: Fri, 08 Mar 1991 17:10
27 lines
1339 bytes
1339 bytes
Grrr...
In <lots of articles>, <lots of people> state that under C, the
compiler must (In W. Losh's words) "do the right thing" when either 0
or NULL is used. This is FALSE.
extern void func_foo();
void main() {
/* this */
func_foo("banana",0);
/* is NOT guaranteed to work as this */
func_foo("grape",(char *)0);
/* is */
}
Since most GNU software does not use prototypes, this is a valid
objection, and one reason why I feel the GNU Coding Standards are an
abomination.
-GAWollman
Garrett A. Wollman - wollman@emily.uvm.edu
Disclaimer: I'm not even sure this represents *my* opinion, never
mind UVM's, EMBA's, EMBA-CF's, or indeed anyone else's.
Technical Details
Message-ID:
<1991Mar8.171015.2767@uvm.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!usc!bbn.com!nic!kira!emily!wollmanReferences:
<27D16AC5.3952@maccs.dcss.mcmaster.ca> <1991Mar6.201539.17401@Solbourne.COM>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,343b7ce3977dbb95 X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1991-03-08 13:15:00 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!usc!bbn.com!nic!kira!emily!wollman From: wollman@emily.uvm.edu (Garrett Wollman) Newsgroups: gnu.misc.discuss Subject: Re: using 0 instead of NULL Message-ID: <1991Mar8.171015.2767@uvm.edu> Date: 8 Mar 91 17:10:15 GMT References: <27D16AC5.3952@maccs.dcss.mcmaster.ca> <1991Mar6.201539.17401@Solbourne.COM> Sender: news@uvm.edu Organization: University of Vermont - EMBA Computing Facility Lines: 27 Raymond-Protection: enabled