Re: Robust detection of endianness at compile time.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Haley <aph-gcc@xxxxxxxxxxxxxxxxxxx> 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.

On the PDP/11 four-byte integers were stored as two 16-bit words in
big-endian order.  Each 16-bit word was stored as two 8-bit bytes in
little-endian order.  The same format was used on the 680x0 versions
of the Alpha Micro.

It is not worth worrying about this format.  If you ever encounter it,
you have much bigger problems to deal with.

See http://en.wikipedia.org/wiki/Middle-endian

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux