[Bug c/60490] please define __LITTLE_ENDIAN__/__BIG_ENDIAN__ for every target where it makes sense

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 10 17:52:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60490

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Because it is redundant with __BYTE__ORDER__ == __LITTLE_ENDIAN__ (etc.)
And, portable apps should use
#include <endian>
#if BYTE_ORDER == LITTLE_ENDIAN
anyway.  Note that __LITTLE_ENDIAN__ etc. is then fairly ambiguous, because it
looks like a special version of LITTLE_ENDIAN macro, but has completely
different meaning.  And it is unclear from it what is little endian, whether
bytes, words, floating point value bytes.



More information about the Gcc-bugs mailing list