public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ben Elliston <bje@au1.ibm.com>
To: binutils@sourceware.org
Subject: PATCH: use unsigned int :1 bitfield
Date: Tue, 02 May 2006 03:43:00 -0000	[thread overview]
Message-ID: <20060502034447.GA2645@ozlabs.au.ibm.com> (raw)

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  <bje@au.ibm.com>

	* 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.  */
 #ifndef TARGET_SYMBOL_FIELDS

             reply	other threads:[~2006-05-02  3:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-02  3:43 Ben Elliston [this message]
2006-05-02  4:07 ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060502034447.GA2645@ozlabs.au.ibm.com \
    --to=bje@au1.ibm.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).