Re:Ahah, Apple does have different math
by barrkel on Tuesday January 05, 2010 @06:02PM
(#1033650)
By results, I meant computational results. The ABI is more a product of what type declarations you have to use to get interoperability on any given platform, and the platform vendor's compiler sets the lead here.
For example, the following C statement:
printf("%d\n", sizeof(long double));
gives the following results on my box:
Cygwin gcc: 12
MSVC: 8
Embarcadero bcc32: 10
So yes, if you are assuming that foo(long double bar) - that specific header definition - compiled with compiler A will be binary compatible when compiled with compiler B, then you are not necessarily safe.
For example, the following C statement:
gives the following results on my box: So yes, if you are assuming that foo(long double bar) - that specific header definition - compiled with compiler A will be binary compatible when compiled with compiler B, then you are not necessarily safe.Just `float`, though, is rather more solid.