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 __BYTE_ORDER__
On Thu, Oct 14, 2010 at 04:29:54PM +0000, Joseph S. Myers wrote:
> On Wed, 13 Oct 2010, Nathan Froyd wrote:
> > to take into account the need for documentation in cpp.texi and to use a
> > __BYTE_ORDER__-based scheme. I am a little uncertain about the use of
> > __BYTE_ORDER__ etc. as at least:
>
> This patch is definitely unsafe. Not so much on account of __BYTE_ORDER__
> (although codesearch.google.com shows plenty of matches for that), but on
> account of __BIG_ENDIAN__ and __LITTLE_ENDIAN__.
Thanks for pointing this out. I will submit an updated patch.
> > +(word) of the quantity, respectively. If @code{__BYTE_ORDER__} is
> > +equal to @code{__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.
>
> Are you sure that 16-bit and 32-bit reflect exactly how the
> machine-independent code in GCC handles the target macros: does it really
> have those sizes hardcoded?
No idea; I doubt that it does. Can we just ditch the pdp11 port? ;)
-Nathan