Date: Sat, 15 Feb 1997 17:03:39 +1100 From: David Nugent <davidn@labs.usn.blaze.net.au> To: Bruce Evans <bde@zeta.org.au> Cc: eivind@dimaga.com, hackers@freebsd.org Subject: Re: NULL as ((void*)0) (was Re: strlen() question) Message-ID: <19970215170339.32710@usn.blaze.net.au> In-Reply-To: <199702150444.PAA04750@godzilla.zeta.org.au>; from Bruce Evans on Feb 02, 1997 at 03:44:38PM References: <199702150444.PAA04750@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970215170339.32710>