From -4195125737123106722
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,f1dec9ce20a9c98f
X-Google-Attributes: gidf78e5,public
From: source@netcom.com (David Harmon)
Subject: Re: null pointers (was: Why's of C++ -- Part 1)
Date: 1999/08/19
Message-ID: <37d2a599.108214081@nntp.ix.netcom.com>#1/1
X-Deja-AN: 514829338
X-NNTP-Posting-Host: netcom15.netcom.com
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
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-UID: 0000000001
X-Status: $$$T
Content-Type: text/plain; charset=us-ascii
Organization: Netcom
X-NETCOM-Date: Thu Aug 19  2:00:54 PM CDT 1999
Mime-Version: 1.0
NNTP-Posting-User: source
Newsgroups: comp.std.c++
Originator: clamage@taumet


On 18 Aug 1999 05:31:47 GMT in comp.std.c++, stanley@West.Sun.COM
(Stanley Friesen [Contractor]) wrote:

>>Would that make the following code legal:
>>
>>const int i=0;
>>char *pc=(void*)i;
>
>If I had my way: no, never.
>
>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 would be an unfortunate inconsistancy to introduce when all
constant integer expressions with the value zero are null pointer
constants, not just the one spelled 0 .



[ 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              ]




