From -3725625386287173796
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,f1dec9ce20a9c98f
X-Google-Attributes: gidf78e5,public
From: clamage@eng.sun.com (Steve Clamage)
Subject: Re: null pointers (was: Why's of C++ -- Part 1)
Date: 1999/08/19
Message-ID: <7pdh80$qaf$1@engnews1.eng.sun.com>#1/1
X-Deja-AN: 514601012
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <7opqvm$vpa$1@news.hal-pc.org> <p6qn1vvob7z.fsf@informatik.hu-berlin.de> <D0eVh8AJVXt3Ewfo@robinton.demon.co.uk> <37B7C714.44E4EFB4@lucent.com> <7pcoem$105@abyss.West.Sun.COM>
X-Original-Date: 18 Aug 1999 05:44:32 GMT
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 935050897 15074 128.250.29.17 (19 Aug 1999 08:21:37 GMT)
Organization: Sun Microsystems Inc., Mountain View, CA
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN7u+fOEDnX0m9pzZAQF6aQF+KYwcAnFEq5F8EsQ2QEGaTC9kOVrZbRLS oAEsGUdgHeT0fUGtUikIvxeysP1Mpeia =esha
NNTP-Posting-Date: 19 Aug 1999 08:21:37 GMT
Newsgroups: comp.std.c++

stanley@West.Sun.COM (Stanley Friesen [Contractor]) writes:

>The special case would be exactly and only the token sequence "(void *)0".
>There is no reason to extend it to integers that happen to have the value
>zero.  That is not particularly useful.

But there is utility in accepting the same null pointer constants
that C accepts.

In C, any constant integer expression with value 0, or that value
cast to void*, is a null pointer constant. I don't see the benefit
in accepting (void*)0 but rejecting, for example, ((void*)0L).

--
Steve Clamage, stephen.clamage@sun.com
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



