This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] replace LIBGCC2_WORDS_BIG_ENDIAN with __WORDS_BIG_ENDIAN__
On 10/12/2010 2:12 PM, Richard Henderson wrote:
>> Wouldn't it be better to define something like __BYTE_ORDER__
>> to 1234, 4321 or 3421 for little endian (WORDS+BYTES), big endian
>> (WORDS+BYTES) and PDP endian (see glibc's endian.h+bits/endian.h)?
> FWIW, I prefer this scheme.
Do you mean for __BYTE_ORDER__ to be a new built-in macro? That has
some complexity; we have to consider 64-bit machines (where the values
might be things like 56781234) or machines without 8-bit bytes.
It seems to me that this is orthogonal to Nathan's patch, which seems
like a monotonic improvement over the existing codebase. I'd rather see
that go in, and if someone wants to invent this other thing later...
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713