Linked by David Adams on Tue 22nd Feb 2011 19:52 UTC, submitted by estherschindler
General Development Your company is ready to upgrade its custom applications from 32-bit to 64-bit. (Finally.) Here's 10 tips to help you make the transition as painless as possible.
Thread beginning with comment 463605
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: ?
by Carewolf on Tue 22nd Feb 2011 22:45 UTC in reply to "RE[2]: ?"
Member since:

No, an int is 32bit on both 32bit and 64bit architectures. On windows even a long is still 32bit on 64bit, though on 64bit linux a long changes from 32bit to 64bit.

Integers are really only a problem if you try to store pointers in them, and that is a really odd sick thing to do.

You have much more problem with updating system-calls, and wierd interfaces that changes API depending on the architecture (like ODBC).

Reply Parent Score: 5

RE[4]: ?
by anda_skoa on Wed 23rd Feb 2011 11:55 in reply to "RE[3]: ?"
anda_skoa Member since:

No, an int is 32bit on both 32bit and 64bit architectures.

Well, yes and no.
Yes in the sense that I personally don't know any 32bit environment either where this wouldn't be true but also No because the only thing you can safely assume is that an int is not shorter than a char and a char is at least wide enough to hold 8 bits.

That's why there are types with specified lengths, e.g. int32_t

Reply Parent Score: 2