Subject: Re: C Language Standard(s)
To: Bakul Shah <bakul@netcom.com>
From: Ted Lemon <mellon@fugue.com>
List: current-users
Date: 12/22/1995 12:16:02
Several people have come back and said that they were pretty sure that
the standard forbids sizeof(long) from being less than sizeof(int),
and one person even told me what section of the standard to look in,
but nobody so far has actually gone and looked at it. Unfortunately,
I don't have a copy, or I'd do it.
Who knows - I could be wrong. The reason I think I'm right is
because I used to be privy to discussions among various people at DEC
and Sun and IBM about how to lay out word sizes on 64-bit machines,
and one scheme that drew wide popularity was:
short = 16 bits
long = 32 bits
int = 64 bits
The rationale is that when programmers specified short or long, they
really meant they wanted a 16-bit integer or a 32-bit integer, and
when they specifed int, they meant ``whatever's fastest.'' People
generally didn't put ints in structures unless it really didn't matter
what size they were.
The theory was that more code would just compile and work OOTB with
the above scheme, and experience generally seemed to prove them to be
right. I don't know why this scheme didn't gain acceptance - maybe it
was in fact counter to the standard, or maybe it just finally seemed
to aesthetically displeasing.
_MelloN_