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 463600
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: ?
by t3RRa on Tue 22nd Feb 2011 22:07 UTC in reply to "RE: ?"
t3RRa
Member since:
2005-11-22

The size of int (integer) is depended on whether its 16, 32 or 64 bit arch and OS.. What it really matters is that in many of programs developers have assumed the size of int is 4 bytes which is true only in 32 bit as I usually do (but in my case it definitely be the case anyway)

Reply Parent Score: 3

RE[3]: ?
by Carewolf on Tue 22nd Feb 2011 22:45 in reply to "RE[2]: ?"
Carewolf Member since:
2005-09-08

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:
2005-07-07

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