Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.compilers > #3256
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: What attributes of a programming language simplify its use? |
| Date | 2022-12-07 10:14 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <22-12-009@comp.compilers> (permalink) |
| 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> |
gah4 <gah4@u.washington.edu> 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/
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-01 14:20 -0800
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-02 02:09 -0800
Re: What attributes of a programming language simplify its use? Thomas Koenig <tkoenig@netcologne.de> - 2022-12-03 10:25 +0000
Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-03 22:16 +0100
Re: What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-06 09:56 -0800
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-06 12:43 -0800
Re: What attributes of a programming language simplify its use? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-12-07 10:14 +0000
Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-07 12:13 +0100
Re: What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-07 17:53 -0800
Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-08 21:42 +0100
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-08 14:44 -0800
Re: C types, was What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-09 15:01 +0100
Re: C types, was What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-08 18:35 -0800
Re: C types, was What attributes of a programming language simplify its use? David Brown <david.brown@hesbynett.no> - 2022-12-09 13:21 +0100
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-12 00:00 -0800
Re: C types, was What attributes of a programming language simplify its use? "marb...@yahoo.co.uk" <marblypup@yahoo.co.uk> - 2022-12-09 07:40 -0800
Re: C types, was What attributes of a programming language simplify its use? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-12-11 10:45 +0000
Simple to implement and to use Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-12-11 19:41 +0200
Re: What attributes of a programming language simplify its use? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-12-03 23:33 +0000
Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-03 17:15 -0800
csiph-web