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> wrote:
>         
> 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.

Oh, gosh, yes.  But it applies even to systems that support the
IEEE 754 format, if they use it in different ways.  In my talks
here, I warn people against importing binary data from a system
that supports denormalised numbers (or infinities or NaNs) to one
that doesn't.  That can cause chaos.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1@xxxxxxxxx
Tel.:  +44 1223 334761    Fax:  +44 1223 334679

[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