Robust detection of endianness at compile time.
Tim Prince
tprince@myrealbox.com
Mon Jul 30 23:22:00 GMT 2007
Ian Lance Taylor wrote:
> Andrew Haley <aph-gcc@littlepinkcloud.COM> writes:
>
>
>> AC_C_BIGENDIAN is for integers. As far as I am aware the PDP/ARM
>> "middle-endian" problem only applies to floating-point words, and the
>> situation for those is far more complex than mere endianness. Not
>> every platform supports the IEEE-754 format, and picking apart other
>> formats requires special-case programming. Happily, this isn't a
>> problem that most people have to solve.
>>
Plauger's "Standard C Library" used short data types throughout when
manipulating float and double, as VAX/ MIPS style data were still in
fairly widespread use. I guess a phase of history has passed when no
one invokes the way VAX and MIPS did things. Plauger's code would have
worked for PDP; I wasn't aware of ARM floating point.
More information about the Gcc-help
mailing list