Hello Uros, no the sizeof long is not always different. E.g. for future target 64bit mingw the long type remains 4-byte size. But may we can use the pointer-size ? Because on i386 32-bit system sizeof(void *)==4 and on x86_64 64-bit system sizeof(void *)==8 !
Regards, i.A. Kai Tietz Uros Bizjak <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 22.12.2006 12:24 To GCC <gcc@gcc.gnu.org> cc Subject Fixme in driver-i386.c Hello! There is a fixme in config/i386/driver-i386.c: --cut here-- if (arch) { /* FIXME: i386 is wrong for 64bit compiler. How can we tell if we are generating 64bit or 32bit code? */ cpu = "i386"; } else --cut here-- Couldn't simple "sizeof(long)" do the trick here, i.e.: --cut here-- int main() { int i = sizeof (long); switch (i) { default: abort(); case 4: case 8: printf ("%i\n", i); } return 0; } --cut here-- gcc -m32 ./a.out 4 gcc -m64 ./a.out 8 Uros.