TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Bob Stout
from: Pascal Schmidt
date: 2003-11-17 18:00:44
subject: Re: [C] word sizes

Hi Bob! :-)

 BS> I have, OTOH, heard of a couple of architectures where you 
 BS> couldn't necessarily count on shorts being 16 bits or longs being 32 
 BS> bits. Ints, of course, are all over the map. Fortunately, the days of 
 BS> those architectures are, like the days of one's complement math, 
 BS> mostly history.
Ahem, gcc on 64 bit machines uses a model where longs are 64 bits (LP64,
longs and pointers are 64 bit, int is 32 bit). On 32 bit machines, it uses
the ILP32 model; meaning int, long, and pointers are 32 bits.

Or did you mean a long could be less than 32 bits on some old oddball machine?

 BS> Excellent point - but, as you point out, not explicitly stated nor 
 BS> immediately obvious.
Even if a char were represented as, say, 64 bits, the actual value could
always be 255 or less, with EOF being represented by a value greater than
255.

Ciao
Pascal

--- Msged/LNX 6.1.1
* Origin: Many are cold, but few are frozen. (1:153/401.2)
SEEN-BY: 633/267 270
@PATH: 153/401 307 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.