This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: symtab/1317: BYTE_BITFIELD never defined, wastes 4 bytes


The following reply was made to PR symtab/1317; it has been noted by GNATS.

From: Andrew Cagney <ac131313@redhat.com>
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: symtab/1317: BYTE_BITFIELD never defined, wastes 4 bytes
Date: Tue, 05 Aug 2003 10:48:22 -0400

  >   /* Be conservative and only use enum bitfields with GCC.  Likewise for
  >      char bitfields.
  >      FIXME: provide a complete autoconf test for buggy enum 
 bitfields.  */
  >
  >   #if (GCC_VERSION > 2000)
  >   #define ENUM_BITFIELD(TYPE) enum TYPE
  >   #define CHAR_BITFIELD unsigned char
  >   #else
  >   #define ENUM_BITFIELD(TYPE) unsigned int
  >   #define CHAR_BITFIELD unsigned int
  >   #endif
 
 BTW, for the sake of inter-project consistency, GDB should probably 
 steal GCC's [sucky] CHAR_BITFIELD and ENUM_BITFIELD macro definitions.
 
 It appears that bitfields work, just not enum bitfields.
 
 Here's the original PR:
 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=296
 
 + struct { enum { one, two, three } : 8 } s1;
 
 enum { one, two, three } e : 8?
 
 
 Andrew
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]