Re: __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ or does it?
On Sat, Aug 6, 2011 at 9:35 PM, Jonathan Wakely wrote: > On 6 August 2011 22:40, Christopher Huang-Leaver wrote: >> Hello, >> >> This isn't really a compiler bug, but it's something which the manual >> doesn't describe too well so I thought I would point this out. >> >> This page of the manual: >> http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros > > That documentation refers to the latest sources in GCC trunk, not to GCC 4.4 > Ha, so it's not a bug. It's a new feature, which doesn't exist before 4.6. Jie
Re: __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ or does it?
On 6 August 2011 22:40, Christopher Huang-Leaver wrote: > Hello, > > This isn't really a compiler bug, but it's something which the manual > doesn't describe too well so I thought I would point this out. > > This page of the manual: > http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros That documentation refers to the latest sources in GCC trunk, not to GCC 4.4
Re: __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ or does it?
On Sat, Aug 6, 2011 at 5:40 PM, Christopher Huang-Leaver wrote: > Output: > > small end first > big end first > > gcc -v > gcc version 4.4.5 (Gentoo 4.4.5 p1.2, pie-0.4.5) > I got the same result with g++-4.4 (4.4.6), g++-4.5 (4.5.3) on Debian testing. But with g++-4.6, I got small end first on my x86_64-linux-gnu machine. I think it's a bug, but it has been fixed in g++-4.6. Regards, Jie