For this code:
int
alpha(int n)
{
n += 3;
return n;
}
int
main(int argc, char* argv[])
{
int n = 1231231;
int m = alpha(n);
return 0;
}
When compiled x86_64, the int is treated as 32 bits:
Note in particular this assembly in the compiled alpha function:
movl %edi, -4(%rbp)
addl $3, -4(%rbp)
movl -4(%rbp), %eax
See that it is pulling 4 bytes (32 bits) for the int parameter.
On an 64 bit architecture, however, I would have expected an int to be treated as 64 bits. What am I misunderstanding?