sizeof(int) == sizeof(long) == portability studies. feasible to make much software 64-bit- sizeof(ptr) == 32. Chessin’s working group had no for- clean without making it 32-bit unclean.
Sometime around 1984, Amdahl mal status, but had well-respected se- The SGI effort proved that 32-bit and 64- UTS and Convex added long long for nior technologists from many systems bit programs could be sensibly support- 64-bit integers, the former on a 32-bit and operating systems vendors, includ- ed on one system, with reasonable data architecture, the latter on a 64-bitter. ing several who were members of the interchange, a requirement for most UTS used this especially for long file C Standards Committee. With all this other vendors. In practice, that meant pointers, one of the same motivations brainpower, one might hope that one that one should avoid long in struc-for long in PDP- 11 Unix (1977). Algol clear answer would emerge, but that tures used to interchange data, exactly 68 inspired long long in 1968, and it was not to be. Each of the three propos- akin to the avoidance of int in the PDP-was also added to GNU C at some point. als (LLP64, LP64, and ILP64) broke dif- 11/VAX days. About this time in 1995 the Many reviled this syntax, but at least it ferent kinds of code, based on the par- Large File Summit agreed on Unix APIs consumed no more reserved keywords. ticular implicit assumptions made in to increase file size above 2GB, using
Of course, 16-bit int was used on the 32-bit happy times. long long as a base data type.
Microsoft DOS and Apple Macintosh Respected members of the group Finally, the Aspen Group in 1995 had
systems, given the original use of Intel made credible presentations citing another round of discussions about the
8086 or MC68000, where 32-bit int massive analyses of code and porting 64-bit C model for Unix and settled on
would have been costly, particularly experience, each concluding, “XXX is LP64, at least in part because it had
on early systems with 8- or 16-bit data the answer.” Unfortunately, XXX was been proved to work and most actual
paths and where low memory cost was different in each case, and the group 64-bit software used LP64.
especially important. remained split three ways. At that point During the 1992 meetings of the
64-bit heats up in 1991/1992. The MIPS I suggested we perhaps could agree on 64-bit C group Microsoft had not yet
R4000 and DEC Alpha were announced header files that would help program- chosen its model, but later chose
in the early 1990s. Email discussions mers survive (leading to <inttypes. LLP64, not the LP64 preferred by Unix
were rampant among various companies h>). Most people did agree that long vendors. I was told that this happened
during 1990–1992 regarding the proper long was the least bad of the alterna- because the only 32-bit integer type
model for 64-bit C, especially when im- tive notations and had some previous in PCs was long; hence, people often
plemented on systems that would still usage. used long to mean 32-bit more explic-
run 32-bit applications for many years. We worried that we were years ahead itly than in Unix code. That meant that
Quite often, such informal cooperation of the forthcoming C standard, but changing its size would tend to break
exists among engineers working for oth- could not wait for it, and the C Stan- more code than in Unix. This seemed
erwisefiercecompetitors. dards Committee members were sup- plausible to me. Every choice broke
In mid-1992 Steve Chessin of Sun portive. If we agreed on anything rea- some codes, and thus people looked at
initiated an informal 64-bit C work- sonable, and it became widespread their own code bases, which differed,
ing group to see if vendors could avoid practice, it would at least receive due leading to reasonable differences of
implementing randomly different 64- consideration. Like it or not, at that opinion.
bit C data models and nomenclatures. point this unofficial group probably Many people despised long long
Systems and operating system vendors made long long inevitable—or per- and filled newsgroups with arguments
all feared the wrath of customers and haps that inevitability dated from 1984. against it, even after it became incorpo-
third-party software vendors otherwise. By 1994, DEC was shipping large sys- rated into the next C standard in 1999.
DEC had chosen LP64 and was already tems and had paid for many third-party The official rationale for the C standard
far along, as Alpha had no 32-bit ver- softwareports, using LP64. SGI wasalso can be consulted by anyone who wants
sion. SGI was shipping 64-bit hardware shipping large systems, which support- to understand the gory details.
6
and working on 64-bit compilers and ed both ILP32LL and LP64, with long Differing implicit assumptions operating system; it preferred LP64 as long filling the role handled by long in about sizes of various data types had well. Many others were planning 64-bit the late 1970s. grown up over the years and caused a CPUs or operating systems and doing The DEC effort proved that it was great deal of confusion. If we could go
hP
uP/uX 11.0 is 64/32-bit oS; ILP32LL + LP64
hP announces PA-RISC 2.0, 64-bit
iBm RS64 PowerPC, AIX 4. 3; ILP32LL + LP64
sun 64/32 Solaris 7 released; ILP32LL + LP64
c
ISo/IEC C (WG14’s “C99”);
includes long long,
at least 64 bits
References:
Archives