Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.compilers Subject: Re: What attributes of a programming language simplify its use? Date: Wed, 07 Dec 2022 10:14:44 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-12-009@comp.compilers> References: <22-12-001@comp.compilers> <22-12-003@comp.compilers> <22-12-004@comp.compilers> <22-12-007@comp.compilers> <22-12-008@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="95306"; mail-complaints-to="abuse@iecc.com" Keywords: design, types Posted-Date: 07 Dec 2022 11:44:50 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3256 gah4 writes: >In the early days of 64 bit computing, which I mostly remember from >the DEC Alpha, C compilers made long the 64 bit type. The early days of 64-bit computing are on the CDC Star and Cray-1, but C was a minor language for them. Yes, we got the first mainstream 64-bit Unix with Digital OSF/1 on the Alpha, and 64-bit APIs and ABIs on Unix had 64-bit long. >That, then, broke too much software assuming long was 32 bits. Obviously not, or other Unix vendors would not have also made longs 64-bit in their interfaces. >So then we got long long as the (close enough to) reliable 64 bit >type. GCC introduced long long indepenently of any 64-bit port; this is easy to see because the original GCC documentation specified that long long int is twice as long as long int. Later, when the Alpha port (and later 64-bit ports) came, the porter decided to make long long 64-bit, i.e., the same size as long; I don't know if the Alpha API/ABI had a requirement on the size of long long, or if the people responsible for the Alpha port did deviate from the documentation for some other reason. When we reported this as a bug, the fix was to change the documentation to say that long long is twice as long as int. Concerning IL32P64, i.e., 32-bit longs with 64-bit pointers, that seems to be a specialty of 64-bit Windows. Fortunately, I don't have to deal with this API (64-bit Cygwin supports the Unix API, i.e., 64-bit long). >Maybe in a few years, we will have the long long long 128 bit type. GCC has supported 128-bit integers for a while, originally we wrote, e.g.: typedef int int128_t __attribute__((__mode__(TI))); (makes me wonder how the compiler sees the "TI"; it's not a keyword, and it's not a defined name in any of the name spaces; gcc tends to pass such things as literal strings (cf. extended asm), but here it does not). Nowadays it seems to (also) have __int128_t as an implementation-specific keyword. I see no motions in the direction of long long long (and, looking at history, it would only have 64 bits in length:-). - anton -- M. Anton Ertl anton@mips.complang.tuwien.ac.at http://www.complang.tuwien.ac.at/anton/