PLEX86  x86- Virtual Machine (VM) Program
 CVS  |  Mailing List  |  Download  |  Newsgroups

Thou shalt have no other gods before the ANSI C standard 1350


Your Ad Here

Your Ad Here

Douglas A. Gwyn

The 64-bit desktop uses 32-bit int. Specifically:

Thou shalt have no other gods before the ANSI C standard 1352
Douglas A. Gwyn Then read it it again. Because that is what I said. Yeah, I know, exactly two platforms took advantage of this. Not even the 16-bit x86 C...

Definition 2.4, page 3P-1 (64-bit ABI), Figure 3-1 (next page): ``unsigned int 4.''

64-bit PowerPC ELF ABI Supplement 1.7, page 5: ``unsigned int 4.''

Binary Interface 0.95, page 12, Figure 3.1: ``unsigned int 4.''

A byte is always 8 bits, and there are 4 bytes in an unsigned int, so there are 32 bits in an unsigned int; and, of course, signed int is 32 bits twos-complement, as Paul commented.

As I said before: ``Having int size vary by machine, according to the size of some low-level registers, is much less useful than having it be a consistent 32 bits.''

Thou shalt have no other gods before the ANSI C standard 1353
Morten Reistad took some long flights a few years ago. each seat had its own touch screen lcd on which you could choose the latest movies. (not on my nickel, airline had paid for biz...

No, it isn't. The last holdout, IBM, switched from hex to binary last century.

There's certainly a general problem of computer variability breaking simple code. What the people from 36-bit la-la land fail to grasp is that complicating the code isn't the only solution.

The second solution is to eliminate the computer variability. This might seem impossible to people who can't think ahead more than a few years; but over long time periods it's quite doable, and it's usually much less expensive than the first solution. That's why, in many cases, the second solution has already been adopted!

Computers have converged on 8-bit bytes, for example. We no longer have to worry about portability to computers with other byte sizes. 36-bit la-la land has been nuked. Perhaps other byte sizes were a worthwhile experiment long ago, but today the programming benefits of a standard 8-bit byte size outweigh any conceivable benefits of allowing further experiments.

Yes, there are some areas where computers haven't converged yet. Yes, this means extra work for programmers writing portable code. But this problem is much smaller than it used to be. The areas of variability are being pushed farther and farther away from anything that typical programmers care about. That's progress.

---D. J. Bernstein, buttociate Professor, Department of Mathematics, Statistics, and Computer Science, University of Illinois at Chicago

Thou shalt have no other gods before the ANSI C standard 1351
You didn't say that, but anyway, C provides a generic data pointer type that you should use for that. There is an excellent reason that pointer to byte is allowed to be wider than...



Your Ad Here

List | Previous | Next

Thou shalt have no other gods before the ANSI C standard 1351

Alt Folklore Computers from Newsgroups

The #1 Usenet Provider on the Internet

Thou shalt have no other gods before the ANSI C standard 1349