[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#301877: gcc-3.3: -O3 is defining BIG_ENDIAN on little endian machines



Package: gcc-3.3
Version: 1:3.3.5-12
Severity: important


Here is a samle source file to demonstrate the problem:

#include <string.h>
#ifdef BIG_ENDIAN
#warning Your machine is big endian
#endif

When compiling with -O3, BIG_ENDIAN is defined on an x86 machine.
Without -O3 or without including string.h, BIG_ENDIAN is not defined.
Just to be clear, BUG_ENDIAN should not be defined, on an x86 machine
regardless of parameters or system includes made.

This bug has been found on multiple 3.3 and 3.4 versions of gcc.
It has been reported by my dev team to be found on Gentoo as well.


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-1-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages gcc-3.3 depends on:
ii  binutils                    2.15-5       The GNU assembler, linker and bina
ii  cpp-3.3                     1:3.3.5-12   The GNU C preprocessor
ii  gcc-3.3-base                1:3.3.5-12   The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.4.3-12   GCC support library

-- no debconf information



Reply to: