From: erik quanstrom <quanstro@coraid.com>
To: 9fans@cse.psu.edu
Subject: [9fans] bitfields
Date: Wed, 6 Jun 2007 07:57:50 -0400 [thread overview]
Message-ID: <5fc4d15bc92167d17cac73461f327df3@coraid.com> (raw)
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 <bsdaemon@comcast.net> 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.
next reply other threads:[~2007-06-06 11:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-06 11:57 erik quanstrom [this message]
2007-06-06 23:34 ` don bailey
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=5fc4d15bc92167d17cac73461f327df3@coraid.com \
--to=quanstro@coraid.com \
--cc=9fans@cse.psu.edu \
/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 NNTP newsgroup(s).