Re: [GD-General] meaning of sizeof(int) on all plateform
Brought to you by:
vexxed72
From: Evan R. <ev...@en...> - 2003-06-28 02:23:31
|
On Friday, June 27, 2003, at 04:52 PM, Jay Woodward wrote: > Hold on -- it seems to me that the existence of forward declaration > necessitates that all pointers be the same size. > > I suppose you wouldn't lose information when casting, as long as it's > guaranteed that sizeof(void*) >= sizeof(any other pointer). Still, my > understanding has always been that all pointers are the same size. Once again, the segmented architecture of the 8088 under DOS is a counterexample. There are "near pointers" which are 16 bit offsets into a standardized segment, and "far pointers" which are 32 bit segment:offset pairs (which makes comparing far pointers interesting, BTW). I can easily imagine an embedded architecture having different length pointers for code pointers and data pointers, as well. In that case, I assume (always dangerous) that void * would be large enough to hold the largest pointer, as Jay suggests, above. Evan >> -----Original Message----- >> From: Gareth Lewin [mailto:GL...@cl...] >> Sent: Friday, June 27, 2003 1:45 AM >> To: gam...@li... >> Subject: RE: [GD-General] meaning of sizeof(int) on all plateform >> >> >> btw, sizeof(pointer) isn't a real value, it is perfectly >> valid for a certain >> platform to have differant sizes of pointers, so sizeof (void*) is not >> always == sizeof(int*). > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/ > 01 > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU7 > > > -- Engines of Mischief Consulting <http://www.enginesofmischief.com> Mischievous Ramblings <http://www.enginesofmischief.com/blogs/ramblings> The Engine of Mischief <http://www.enginesofmischief.com/engine> Mischief's Travelblog <http://www.enginesofmischief.com/blogs/travelblog> Today's Oxymoron: Act naturally |