Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!ucbvax!decvax!bhjat!bhj From: bhj@bhjat.UUCP (Burt Janz) Newsgroups: comp.lang.c Subject: Re: C machine Message-ID: <163@bhjat.UUCP> Date: 25 Dec 87 03:22:37 GMT References: <7535@alice.UUCP> <8226@steinmetz.steinmetz.UUCP> <461@auvax.UUCP> Organization: BHJ Associates, Nashua, NH Lines: 29 I realize that this may have been discussed before, but I have a minor problem... no, not a problem... more like a question. Ok. K&R states that the PDP-11, a 16-bit machine, defines an int as 16 bits, a short as 16 bits, and a long as 32 bits. The VAX defines an int as 32 bits, a short as 16 bits, and a long as 32 bits. Altos defines their 386 UNIX compiler's sizes the same as the VAX. The 3B1 defines their 68010 compiler's sizes the same as the 386 (although the byte ordering is different - doesn't matter for this application). In the "white book" on page 34, there is a brief discussion of "..."natural" size for a particular machine...". I assume that means the internal register word size, not the bus transfer word size. I hold that a short is defined as ALWAYS being 16 bits, and a long as ALWAYS being 32 bits. I don't know if I'm right in this regard, but being stubborn, I always press the point of previous compiler/machine definitions. So, on a 64-bit processor, what's an int? For that matter, on machines larger than 32 bits, what would short and long be? I'm not particularly interested in float and double, as those would be functions of the math routines being used, or the math chips available for the machine. I ask the opinions, and/or expert knowledge, of those on the net. Burt Janz ..decvax!bhjat!bhj (preferred path) ..decvax!bhjatt!bhj (sorry, no direct phone #...)