Saturday, September 8, 2007

OS-X is 64-bit Unix

Just to prove that my Macbook is a 64-bit machine, I build the following simple program:

#include

int main()
{
printf("sizeof(long) = %d\n", sizeof(long));
printf("sizeof(double) = %d\n", sizeof(double));
}


Compile it with:

gcc -mtune=nocona -m64 -mfpmath=sse -msse3 -O3 test.c -o test

and execute test. If the size of long is 8 bytes, it's 64-bit!

No comments:

Post a Comment