On a power5+ with linux and gcc, int stays at 32bit even with 64bit code.
-gustaf
----------- default compilation
% cc t.c -o t
% file t
t: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV),
for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
% ./t
int: 4
ptr: 4
long: 4
long long: 8
short: 2
----------- 64 bit
% cc -m64 t.c -o t
% file t
t: ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV), for
GNU/Linux 2.4.19, dynamically linked (uses shared libs), not stripped
% ./t
int: 4
ptr: 8
long: 8
long long: 8
short: 2
Zoran Vasiljevic schrieb:
On 14.09.2006, at 22:13, Stephen Deasey wrote:
Yes. Normally (what is normal today?) on a 64 bit box/compiler:
int = 32
ptr = 64
long long = 64
long = 64 (this I'm not sure)
short = 16