From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5fc4d15bc92167d17cac73461f327df3@coraid.com> From: erik quanstrom Date: Wed, 6 Jun 2007 07:57:50 -0400 To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] bitfields Topicbox-Message-UUID: 7a325140-ead2-11e9-9d60-3106f5b1d025 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. - erik On Wed Jun 6 03:06:00 EDT 2007, bruce.ellis@gmail.com wrote: > easy. ken had (has) no respect for bitfields. > he is a wise man. > > brucee > > On 6/6/07, Kris Maglione wrote: > > On Wed, Jun 06, 2007 at 12:30:55AM -0400, Kris Maglione wrote: > > > !8c test.c && 8l test.8 > > > ! > > > !./8.out > > > foo.x: -1 > > > ! > > > > Also: > > > > !8c -wF test.c && 8l test.8 > > warning: test.c:11 format mismatch d LONG 0:1, arg 2 > > ! > > > > I'm surprised that there's not a warning about the overflow. > > > > -- > > Kris Maglione > > > > For every human problem, there is a neat, plain solution -- > > and it is always wrong.