From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4031 invoked by alias); 9 Dec 2004 18:00:40 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3986 invoked from network); 9 Dec 2004 18:00:35 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 9 Dec 2004 18:00:35 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CcSah-0007Zy-3S for ; Thu, 09 Dec 2004 13:00:35 -0500 Date: Thu, 09 Dec 2004 18:00:00 -0000 From: Daniel Jacobowitz To: gcc@gcc.gnu.org Subject: Re: ENUM_BITFIELD and -fshort-enums Message-ID: <20041209180035.GA29063@nevyn.them.org> Mail-Followup-To: gcc@gcc.gnu.org References: <20041209174614.GA28319@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041209174614.GA28319@nevyn.them.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00328.txt.bz2 On Thu, Dec 09, 2004 at 12:46:14PM -0500, Daniel Jacobowitz wrote: > I tried to build a native arm-unknown-linux-gnueabi compiler yesterday. > The only major problem was the fact that EABI defaults to > -fshort-enums. rtl.h has this: > > /* The kind of expression this is. */ > ENUM_BITFIELD(rtx_code) code: 16; > > But since there are only 164 RTL codes at present, with -fshort-enums > the underlying type of enum rtx_code is "char". So GCC gives an error > that the bitfield is wider than its type. > > For now I'm just using an x-linuxeabi file which builds GCC using > -fno-short-enums, but that's not a good solution. Should this bitfield > be allowed? Other alternative fixes: - Add an RTX code with value 65535 to force the enum to be large enough. - Shrink the bitfield and leave 8 bits of padding in struct rtx_def. -- Daniel Jacobowitz