This is the mail archive of the mailing list for the binutils 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]

PATCH: use unsigned int :1 bitfield

Another patch hanging around in my checkout.  It's best to qualify one
bit wide bitfields as unsigned.  I believe the C standard leaves the
exact range of values for a signed :1 field up to the
implementation--am I right?

Okay for mainline?

2006-05-02  Ben Elliston  <>

	* config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Make single bit
	field unsigned.

Index: config/obj-elf.h
RCS file: /cvs/src/src/gas/config/obj-elf.h,v
retrieving revision 1.28
diff -u -p -r1.28 obj-elf.h
--- config/obj-elf.h    20 Sep 2005 18:24:45 -0000      1.28
+++ config/obj-elf.h    2 May 2006 03:39:25 -0000
@@ -83,7 +83,7 @@ struct elf_obj_sy
 #define OBJ_SYMFIELD_TYPE struct elf_obj_sy
 /* Symbol fields used by the ELF back end.  */
-#define ELF_TARGET_SYMBOL_FIELDS int local:1;
+#define ELF_TARGET_SYMBOL_FIELDS unsigned int local:1;
 /* Don't change this; change ELF_TARGET_SYMBOL_FIELDS instead.  */

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