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

Bug#301877: marked as done (gcc-3.3: -O3 is defining BIG_ENDIAN on little endian machines)



Your message dated Sat, 21 May 2005 17:17:18 +0200
with message-id <87vf5czk01.fsf@debian.org>
and subject line Bug#301877: gcc-3.3: -O3 is defining BIG_ENDIAN on little endian machines
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 28 Mar 2005 22:20:21 +0000
>From n-a-c-h@users.sf.net Mon Mar 28 14:20:21 2005
Return-path: <n-a-c-h@users.sf.net>
Received: from master.debian.org [146.82.138.7] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DG2ar-0003ad-00; Mon, 28 Mar 2005 14:20:21 -0800
Received: from bzq-218-224-91.red.bezeqint.net ([127.0.0.1]) [81.218.224.91] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DG2ao-0001Q8-00; Mon, 28 Mar 2005 16:20:18 -0600
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: "Nach M. S." <n-a-c-h@users.sf.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gcc-3.3: -O3 is defining BIG_ENDIAN on little endian machines
X-Mailer: reportbug 3.8
Date: Tue, 29 Mar 2005 00:28:43 +0200
X-Debbugs-Cc: n-a-c-h@users.sf.net
Message-Id: <E1DG2ao-0001Q8-00@master.debian.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-9.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
	OUR_MTA_MSGID,X_DEBBUGS_CC autolearn=ham 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

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

---------------------------------------
Received: (at 301877-done) by bugs.debian.org; 21 May 2005 15:17:50 +0000
>From falk@debian.org Sat May 21 08:17:50 2005
Return-path: <falk@debian.org>
Received: from smtp08.web.de [217.72.192.226] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DZVjZ-0001cd-00; Sat, 21 May 2005 08:17:50 -0700
Received: from [82.82.220.210] (helo=juist)
	by smtp08.web.de with asmtp (TLSv1:DES-CBC3-SHA:168)
	(WEB.DE 4.105 #291)
	id 1DZVj4-00038W-00
	for 301877-done@bugs.debian.org; Sat, 21 May 2005 17:17:18 +0200
Received: from falk by juist with local (Exim 4.50)
	id 1DZVj4-00022r-GP
	for 301877-done@bugs.debian.org; Sat, 21 May 2005 17:17:18 +0200
To: 301877-done@bugs.debian.org
Subject: Bug#301877: gcc-3.3: -O3 is defining BIG_ENDIAN on little endian
 machines
From: Falk Hueffner <falk@debian.org>
X-Face: "iUeUu$b*W_"w?tV83Y3*r:`rh&dRv}$YnZ3,LVeCZSYVuf[Gpo*5%_=/\_!gc_,SS}[~xZ
 wY77I-M)xHIx:2f56g%/`SOw"Dx%4Xq0&f\Tj~>|QR|vGlU}TBYhiG(K:2<T^
Date: Sat, 21 May 2005 17:17:18 +0200
Message-ID: <87vf5czk01.fsf@debian.org>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (cilantro, linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: falk@debian.org
X-Sender: falk.hueffner@web.de
Delivered-To: 301877-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Hi,

#ifdef BIG_ENDIAN is not the way to test endianness. You should use
#if __BYTE_ORDER == __BIG_ENDIAN.

-- 
	Falk



Reply to: