| For the same CPU architecture, compiler and FPU control word, you should expect the same results. That's a stretch. Just because it's called "GCC" doesn't mean it behaves exactly the same on every platform, even if the CPU architecture is the same. Apple makes extensive modifications, has their own ABI (see below), etc. In a possibly related note, however, Apple has bizarre and unnecessarily strict alignment policies for Mac OS on x86: It's not "bizarre and unnecessarily strict" if you want to be able to rely on SSE2+. Apple had the advantage of being able to define their ABI without regard to most legacy concerns, and so they did. The reason that it's strictly enforced everywhere is that since Apple's compilers use SSE2+ they must be able to assume that, at function entry, the stack is properly (16 byte) aligned. I understand your pain -- I've had to update a JIT implementation to deal with this, along with quite a bit of assembly that assumed 4 byte alignment, but Apple's reasoning makes sense. See also: http://stackoverflow.com/questions/612443/why-does-the-mac-a... |