This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Robust detection of endianness at compile time.
- From: "Young, Michael" <Michael dot Young at paetec dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 31 Jul 2007 10:45:08 -0400
- Subject: RE: Robust detection of endianness at compile time.
Detecting endianness at compile time - IIRC, some CPUs (MIPS and Alpha come to mind)
are configurable to support either. Does anyone have any links for details on this?
(I quickly googled for it but came up short.) I don't know if it is hardware or software
configurable, and, if it is the latter, if it's on a per-thread basis, and/or if it
can be configured by non-supervisor code. Anyway, depending on these details, it may
be "dangerous" to assume an endianness at compile-time - or am I really missing the
mark here?
Thanks,
Mike