From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <46674468.6050707@gmail.com> Date: Wed, 6 Jun 2007 17:34:00 -0600 From: don bailey User-Agent: Thunderbird 1.5.0.10 (X11/20070417) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] bitfields References: <5fc4d15bc92167d17cac73461f327df3@coraid.com> In-Reply-To: <5fc4d15bc92167d17cac73461f327df3@coraid.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 7a46cce2-ead2-11e9-9d60-3106f5b1d025 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 erik quanstrom wrote: > actually, if bit fields operate on 2s complement i think > that's the correct answer. > > if you have a n-bit integer ~0 (all ones) is -1. so if you > have a one-bit signed integer, the possiblities are 0b and > 1b which should be 0 and -1. That's my take on it as long as the type is defined as signed. Did GNU always enforce bitfields to be unsigned before? What was the reasoning behind this change? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGZ0RoyWX0NBMJYAcRAk1kAJsHjzP5/VlPKVfgGKaotVjx/Ema3gCfXcY2 pORPJK00rGWu4oGeBaW1mDU= =TTAS -----END PGP SIGNATURE-----