|
From: Georg F. <fu...@is...> - 2001-04-09 16:29:26
|
You can and must look in the file >>limits.h<<. ISO C requires that implementations document the ranges of the integer types in the header file *limits.h.*" Earnie Boyd wrote: > > Joerg Bruehe wrote: > > > > Hi ! > > > > Lloyd Dupont wrote: > > > > > > ok, if i well understand char, short, long have a size independant > > > of thet processor > > > whire are, respectively, 1, 2, 4. > > > and int is the size of a register. 4 on 486 machine an even 8 on a > > > 64 bits machine (so sinzeof(int) > sizeof(long) for such a machine) > > > > I do not know the exact location(s) in the C standard(s), > > but I am quite sure this is wrong: > > > > On byte-addressable machines, "char" is 1 byte. > > (AFAIK, it is even defined that on _all_ machines > > sizeof ( char ) == 1 .) > > > > What is your definition of BYTE? > AIUI, the standard (which I don't have a reference to either) guarantees > that `sizeof(char) == 1' but doesn't guarantee that `sizeof(char) == > 8bits'. > > AIUI, the standard says short <= int <= long <= long long <= next > generation bit pattern. Given this the bit length of short, int, long, > long long, ... could all be the same length. > > IMO, it would be beneficial for the standard to change to using int8, > int16, int32, etc. so that it was obvious as to what is meant; but, that > isn't likely to happen anytime soon. > > Earnie. > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options at: > http://lists.sourceforge.net/lists/listinfo/mingw-users -- Georg Fusz Technische Universitaet Berlin, Germany Fon: Uni.: +49 30 314 26 884 privat: +49 30 815 30 32 Handy: +49 173 20 10 696 Homepage: http://www.cadlab.tu-berlin.de/~fusz/ |