From owner-freebsd-hackers Fri Feb 14 22:07:37 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id WAA02760 for hackers-outgoing; Fri, 14 Feb 1997 22:07:37 -0800 (PST) Received: from labs.usn.blaze.net.au (labs.usn.blaze.net.au [203.17.53.30]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA02703 for ; Fri, 14 Feb 1997 22:04:20 -0800 (PST) Received: (from davidn@localhost) by labs.usn.blaze.net.au (8.8.5/8.8.5) id RAA23958; Sat, 15 Feb 1997 17:03:41 +1100 (EST) Message-ID: <19970215170339.32710@usn.blaze.net.au> Date: Sat, 15 Feb 1997 17:03:39 +1100 From: David Nugent To: Bruce Evans Cc: eivind@dimaga.com, hackers@freebsd.org Subject: Re: NULL as ((void*)0) (was Re: strlen() question) References: <199702150444.PAA04750@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61 In-Reply-To: <199702150444.PAA04750@godzilla.zeta.org.au>; from Bruce Evans on Feb 02, 1997 at 03:44:38PM Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Feb 02, 1997 at 03:44:38PM, Bruce Evans wrote: > >[1] There has come up one serious objection here, relating to C++. If this > >objection is correct, it mean that the proposal absolutely should be > >dropped. Besides, nobody but me seems to be in favour, and it isn't > >important to me, so... > > NULL could be ifdefed for c++. However, gcc seems to accept > `char *p = (void *)0;' at all warning levels. > I don't know C++ well enough to tell if this is a bug. Hard to say. If some other constant or pointer type is accepted then it certainly is. C++ provides no automatic type conversion of void* to any other pointer type, which of course is a feature and not a bug. :) Regards, David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/