[cfe-commits] [PATCHES] add __BYTE_ORDER__ predefined macro, improve tests

nobled nobled at dreamwidth.org
Thu Jul 19 10:41:33 PDT 2012


ping.

On Mon, Jul 9, 2012 at 11:34 PM, <nobled at dreamwidth.org> wrote:
> The __BYTE_ORDER__ predefined macro was added in GCC 4.6:
> http://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html
>
> There's a similar macro, __FLOAT_WORD_ORDER__, but it looks like it
> mainly exist to accommodate fairly obscure architectures and ARM's
> old FPA instructions, so it doesn't seem worth bothering with.
>
> (Not sure if the TCE pseudo-architecture is actually supposed to be
> big-endian or not, but that's how it comes out right now. None of the
> targets in Targets.cpp seem to ever say "BigEndian = true;" -- is
> it default-initialized to true somewhere else?)
>
> While adding the preprocessor tests for it I noticed some oversights
> that the other three patches fix:
>
> - add NVPTX and NVPTX64 predefined macro tests
> - add tests for __OPTIMIZE_SIZE__, which uncovered an overflow bug with -Oz
> - add more positive tests for _LP64 and __LP64__ that should have
> existed on e.g. mips64, as well as negative tests to all the other,
> 32-bit architectures.
>
>
> Okay to commit?



More information about the cfe-commits mailing list