Andrew Haley <aph@xxxxxxxxxx> writes: >> If I compile a.c with "gcc-x.x.x (32 bits)" on a Pentium 4 machine, and >> with "gcc-x.x.x (64 bits) -m32" on an Opteron, am I guaranteed that both >> a.o will have the same contents? > > With the same compiler version and the same inputs to the compiler and > the same compiler options, yes. It will also depend on how the compiler itself is compiled. If one compiler is compiled in 32-bit mode and the other compiler is compiled in 64-bit mode, then it is possible to get slightly different output is some cases. The output in both cases will be correct--there will be no leakage of 64-bit data structures into the 32-bit code or anything like that--but it may not be identical. Ian