Author: Robert Hyatt
Date: 17:02:46 09/22/99
Go up one level in this thread
On September 22, 1999 at 17:24:41, Dann Corbit wrote: >On September 22, 1999 at 15:00:47, Dave Gomboc wrote: >[snip] >>>"long long x" isn't ANSI C, for starters. >>> >>>Dave >> >>Has it been added in C9X draft? >Unfortunately. > >"[#4] There are five standard signed integer types, >designated as signed char, short int, int, long int, and >long long int. (These and other types may be designated in >several additional ways, as described in 6.7.2.) There may >also be implementation-defined extended signed integer >types.25) The standard and extended signed integer types >are collectively called signed integer types.26)" > >It's a horrible abomination. I imagine we should name the 128 bit integer >humongous int, and the 256 bit integer titanic int. Not to be outdone, we could >call the 512 bit integer super_collossal_stupendous int. No... it in intuitively obvious to the casual observer that a 128 bit integer will be knows as a "long long long variable". Unless you are on a machine that uses 16 bits for regular ints, in which case it would be a "long long long long int". I much prefer Microsoft's approach without the underscore... ie int64 or int32 or int16, as that is _absolutely_ clear as to what you want, and the compiler is free to comply or produce an error. As it is, who in the hell knows what a "long" will get you? 16 bits. 32 bits. 64 bits. It all depends on the basic architecture type... And it is insane to leave it 'open'. > >I suggested to the committe that they free the bitfields from those poor unions >that hold them captive. E.g.: >int foo:64; /* 64 bit integer */ >unsigned int bar:12; /* 12 bit integer */ >I will admit that it could be problematic to take the address of a one bit >integer. Just waste 7 bits in such a case. > >Oh well, water under the bridge. Those shouldn't be a problem, and you should _never_ take the address of a bit field in any compiler I can think of. In fact, the last time I tried it, the compiler rejected it instantly... but in any case, long long is gross. 128 bit ints are coming, and long long long is _really_ gross...
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.