Dominique Devienne
On Fri, May 1, 2009 at 10:32 AM, Dan Day
wrote: I thought that int represented the natural word size of the architecture. If so, then wouldn't unsigned int be 64-bit on a 64-bit platform as well?
I had heard this before as well. I took a quick look through c1x-1336 (current (?) draft of C) though, and I could not find anything to this effect. Of course, that doesn't say it's not there, and I did not check the C++ standard.
The few 64-bit platforms I've seen keep [unsigned] int at 32-bits. --DD
To be pedantic, this depends on the system's data model. http://en.wikipedia.org/wiki/64-bit#64-bit_data_models http://www.unix.org/version2/whatsnew/lp64_wp.html The first link does make some effort into listing which systems follow which models. Indeed, as Dominique says, most recent systems (e.g. Linux, Mac, and Windows on amd64) have chosen models which have kept int at 32bit. -tom