expand_expr sign extension problem.

Michael Meissner meissner@cygnus.com
Thu Apr 13 21:07:00 GMT 2000


On Thu, Apr 13, 2000 at 08:31:56PM -0500, Robert Lipe wrote:
> > > 	#ifndef __GNUC__
> > > 	#define INT_ONLY_FIELDS
> > > 	#endif
> > 
> > But then you loose the ability for a port to say its non-GCC compiler does
> > support enum bitfields.  I'll defer that though to those that use such a
> > compiler.
> 
> But that isn't precisely what INT_ONLY_FIELDS explictly circumvents.  If
> you have a compiler that does support enum bitfields in a way that the
> standards allow them to (signed instead of unsigned) that is also what
> INT_ONLY_FIELDS gets around.   It implictly circumvents this behaviour
> by sandbagging extra bits before the sign bits...
> 
> > > I've just thought of a good reason why stages 2 & 3 might 
> > > need to be built with INT_ONLY_FIELDS defined. What if the
> > > host debugger can't handle enumerated bit fields!
> > 
> > Or you use gdb as the host debugger, and don't use COFF debug format.
> 
> I can't quite parse that, Michael.  Are you saying that COFF debug
> format doesn't support this or that GDB w/ COFF debugging doesn't
> support this or that GDB with, say, stabs, doesn't support this?

I don't believe the COFF debug format can describe enum bitfields.  However, it
has been quite some time since I looked at the format, I may be mistaken.

-- 
Michael Meissner, Cygnus Solutions, a Red Hat company.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482


More information about the Gcc mailing list