This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: long long vs long


nleroy@norland.com  wrote:

#Technically, it doesn't make sense, at least in the PC world, where
#all processors are <=32bits. 
PICKY_MODE = TRUE
surely not *all* PC processors - what about the Alpha's? I realise that 
they're not really widespread, but they are out there. I suppose you could
also count PowerPC in that vein.
PICKY_MODE = FALSE

#Probably the more pervasive reason, however, is that there exists A
#LOT of code out there which expects sizeof(long)==4.  It's sort-of an
#un-official C standard.  In particular, legacy code dealing with
#networking, etc., is frequently very loaded with such assumptions.
#IIRC, the original CRAY C compiler used a 32-bit long and a 64-bit
#int, just because so much code had this expectation. 
Yes, and just to confuse the issue, the later compilers used 48bit as the
default. Although you could say '-i64' on the command line to promote these 
variables
all to 64bit.

#IMHO: C should have included standard data sizes, as well as it's generic 
types.  It
#would have made many things a lot simpler.
Agreed. Personally I cannot see a problem with :
short = 8bits, int=16bits, long=32bits, (long long = 64 bits)
other than possible problems when Merced et al are around, rumour has it that 
this
is 128bit native? So what would this be - "long long long" perhaps?

Bob Cross.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]