Subject: Re: -fshort-enums vs ARM ABI
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm
Date: 02/13/2002 17:24:20
On Wed, 13 Feb 2002, Jason R Thorpe wrote:
> On Wed, Feb 13, 2002 at 04:44:46PM +0000, Ben Harris wrote:
>
> > It looks like -fshort-enums (as embodied in gcc/c-decl.c::finish_enum())
> > doesn't quite match the ARM ABI for enums. Specifically, finish_enum()
> > makes an enum signed iff it has any negative vlaues, whereas in the ARM
> > ABI, 16-bit and 32-bit enums are signed by default (and only unsigned if
> > they have values > 2^15 or 2^31 respectively). This will need fixing:
> > Richard?
>
> Add a -fsigned-enum? And then enable it by default for ARM ELF?
Note that 8-bit enums should default to unsigned, so that may not be the
best name.
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>