Subject: Re: -fshort-enums vs ARM ABI
To: Jason R Thorpe <email@example.com>
From: Ben Harris <firstname.lastname@example.org>
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
Ben Harris <email@example.com>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>