From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24242 invoked by alias); 28 Oct 2002 13:56:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24218 invoked by uid 71); 28 Oct 2002 13:56:02 -0000 Resent-Date: 28 Oct 2002 13:56:02 -0000 Resent-Message-ID: <20021028135602.24217.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, fabio.torchetti@sun.com Received: (qmail 3083 invoked by uid 61); 28 Oct 2002 13:50:37 -0000 Message-Id: <20021028135037.3078.qmail@sources.redhat.com> Date: Mon, 28 Oct 2002 05:56:00 -0000 From: fabio.torchetti@sun.com Reply-To: fabio.torchetti@sun.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/8379: bits/byteswap.h mistakenly redefines __bswap_16 instead of __bswap_32 when using constant definition X-SW-Source: 2002-10/txt/msg01154.txt.bz2 List-Id: >Number: 8379 >Category: c >Synopsis: bits/byteswap.h mistakenly redefines __bswap_16 instead of __bswap_32 when using constant definition >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: mistaken >Submitter-Id: net >Arrival-Date: Mon Oct 28 05:56:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Fabio Torchetti >Release: gcc (GCC) 3.2 >Organization: >Environment: Linux/RH8.0 default installation >Description: In bits/byteswap.h we have the following fallback in case the compiler is not running on __GNUCC_ > 2 (...or this is not defined.): Line 83: #else # define __bswap_16(x) \ (__extension__ \ ({ register unsigned int __x = (x); __bswap_constant_32 (__x); })) #endif This should actually be: #else # define __bswap_32(x) \ (__extension__ \ ({ register unsigned int __x = (x); __bswap_constant_32 (__x); })) #endif ...or so I guess. >How-To-Repeat: Just compile anything without defining __GNUCC__ > 2 >Fix: As shown above >Release-Note: >Audit-Trail: >Unformatted: