From 4829470284807020822
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,9684813612e15361
X-Google-Attributes: gidf78e5,public
From: James Kuyper <kuyper@wizard.net>
Subject: Re: pointers: sizeof(pointer)
Date: 1998/06/29
Message-ID: <3597B24C.167E@wizard.net>#1/1
X-Deja-AN: 367147987
X-NNTP-Posting-Host: gscsgi02.gsfc.nasa.gov
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <slrn6oqcgp.lfi.sbnaran@bardeen.ceg.uiuc.edu> <6mkkaq$dgu@engnews1.Eng.Sun.COM> <3591A612.15DA@aristeia.com> <6mu1lq$fon@engnews1.Eng.Sun.COM> <35930246.1692@noSPAM.central.beasys.com> <35942D10.24F0@aristeia.com>
X-UID: 0000000001
X-Status: $$$T
Content-Type: text/plain; charset=us-ascii
Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
Mime-Version: 1.0
Newsgroups: comp.std.c++
Originator: clamage@taumet


Scott Meyers wrote:
> 
> David R Tribble wrote:
> > Leave it to Microsoft to come up with a different, and inherently
> > worse, solution.  I believe that they think of themselves as being
> 
> I like dumping on Microsoft (or IBM or Sun or HP...) as much as anybody,
> because, well, because it's fun to pick on companies.  However, I got the
> impression from Pietrek's article that Microsoft made its decision based on
> the kinds of technical considerations Steve described for Sun and you
> described for DEC.  From Matt's article:
> 
>   The second scenario for a 64-bit type model is ... leave the int as 32
>   bits while using 64 bits for longs and pointers.  This is the model that
>   64-bit Unix implementations use.  For Unix, [this] is a good choice from
>   the portability perspective, since most Unix APIs use int parameters,
>   rather than longs.
> 
>   Windows, on the other hand, uses lots of types that ultimately resolve
>   down to a long, and hence would be 64 bits in this model.  For this

So change the typedefs when providing an implementation for such a
model.

>   reason, a [64-bit long] Windows implementation would have many of the
>   same probams as the [64-bit int] model.  In addition, code that currently
>   gets away with assuming that ints and longs are equivalent would break
>   under [the 32-bit int, 64-bit long] model.

Good - defective code should be caught as soon as possible. You can
combine the fixes with your Y2K fixes, if necessary.


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




