From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21573 invoked from network); 4 Mar 1999 10:36:09 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Mar 1999 10:36:09 -0000 Received: (qmail 17403 invoked by alias); 4 Mar 1999 10:35:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5638 Received: (qmail 17395 invoked from network); 4 Mar 1999 10:35:47 -0000 Sender: B.Stephens@isode.com To: zsh-workers@sunsite.auc.dk Subject: Re: 0 vs. NULL (RE: Worrisome warnings after recent patches) References: <000901be6619$6f8a6930$21c9ca95@mowp.siemens.ru> <36DE478C.2F17DA58@uni-hamburg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii From: Bruce Stephens Date: 04 Mar 1999 10:35:16 +0000 In-Reply-To: Bernd Eggink's message of "Thu, 04 Mar 1999 09:42:52 +0100" Message-ID: User-Agent: Gnus/5.070079 (Pterodactyl Gnus v0.79) XEmacs/20.4 (Emerald) Bernd Eggink writes: > Andrej Borsenkow wrote: > > What is the point of using NULL to initialize null pointer. The only > > portable and official way is to use `0'(zero), that is garanteed to be > > converted to whatever representation null pointer has on a given system. > > No, this applies to C++ only, not to C. In C you should use the NULL > macro or (void*)0. There's an issue with arguments to functions which don't have prototypes, but apart from that, the literal 0 as a pointer should be fine in C.