diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-23 03:05:47 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-23 03:05:47 +0000 |
commit | f6e5e45643c1d764440adf5c6d65e0995619c6ce (patch) | |
tree | 3d3cfc3c02f0c38bb0e407da7fd4e15a6393c11b /gcc/doc/cpp.texi | |
parent | 8658e08626b301a519308b806f52f93afce6ae03 (diff) | |
download | gcc-f6e5e45643c1d764440adf5c6d65e0995619c6ce.tar.gz |
gcc/
* cppbuiltin.c (define_builtin_macros_for_type_sizes): Define
__BYTE_ORDER__, __ORDER_LITTLE_ENDIAN__, __ORDER_BIG_ENDIAN__, and
__ORDER_PDP_ENDIAN__.
* libgcc2.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
(struct DWstruct): Define based on __BYTE_ORDER__.
* config/fixed-bit.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
(struct INTstruct): Define based on __BYTE_ORDER__.
* config/dfp-bit.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
(LIBGCC2_FLOAT_WORDS_BIG_ENDIAN): Test __BYTE_ORDER__.
* system.h (LIBGCC2_WORDS_BIG_ENDIAN): Poison identifier.
* config/arc/arc.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/arm/arm.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/ia64/ia64.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/iq2000/iq2000.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/lm32/lm32.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/m32r/m32r.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/mcore/mcore.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/mep/mep.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/mips/mips.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/rs6000/sysv4.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/rx/rx.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/score/score.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/sh/sh.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/sparc/sparc.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* config/xtensa/xtensa.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* doc/tm.texi.in (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
* doc/tm.texi: Regenerate.
* doc/cpp.texi (__BYTE_ORDER__, __ORDER_LITTLE_ENDIAN__): Document.
(__ORDER_BIG_ENDIAN__, __ORDER_PDP_ENDIAN__): Likewise.
libdecnumber/
* dconfig.h (LIBGCC2_WORDS_BIG_ENDIAN): Delete.
(LIBGCC2_FLOAT_WORDS_BIG_ENDIAN): Test __BYTE_ORDER__.
libgcc/
* config/libbid/bid_gcc_intrinsics.h (LIBGCC2_WORDS_BIG_ENDIAN):
Delete.
(LIBGCC2_FLOAT_WORDS_BIG_ENDIAN): Test __BYTE_ORDER__.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165881 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/cpp.texi')
-rw-r--r-- | gcc/doc/cpp.texi | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index a580e6108c8..ddcf81467f6 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -2265,6 +2265,30 @@ Defined to the number of bytes of the C standard data types: @code{int}, @code{double}, @code{long double}, @code{size_t}, @code{wchar_t}, @code{wint_t} and @code{ptrdiff_t}. +@item __BYTE_ORDER__ +@itemx __ORDER_LITTLE_ENDIAN__ +@itemx __ORDER_BIG_ENDIAN__ +@itemx __ORDER_PDP_ENDIAN__ +@code{__BYTE_ORDER__} is defined to one of the values +@code{__ORDER_LITTLE_ENDIAN__}, @code{__ORDER_BIG_ENDIAN__}, or +@code{__ORDER_PDP_ENDIAN__} to reflect the layout of multi-byte and +multi-word quantities in memory. If @code{__BYTE_ORDER__} is equal to +@code{__ORDER_LITTLE_ENDIAN__} or @code{__ORDER_BIG_ENDIAN__}, then +multi-byte and multi-word quantities are laid out identically: the +byte (word) at the lowest address is the least significant or most +significant byte (word) of the quantity, respectively. If +@code{__BYTE_ORDER__} is equal to @code{__ORDER_PDP_ENDIAN__}, then +bytes in 16-bit words are laid out in a little-endian fashion, whereas +the 16-bit subwords of a 32-bit quantity are laid out in big-endian +fashion. + +You should use these macros for testing like this: + +@smallexample +/* @r{Test for a little-endian machine} */ +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +@end smallexample + @item __DEPRECATED This macro is defined, with value 1, when compiling a C++ source file with warnings about deprecated constructs enabled. These warnings are |