9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Paul Lalonde <plalonde@telus.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] quiz
Date: Tue,  5 Jun 2007 18:07:00 -0700	[thread overview]
Message-ID: <2F03E7E9-C7F5-41C6-9E27-462B6B07EE14@telus.net> (raw)
In-Reply-To: <13426df10706051736q4e1852a9g3f54d8f6e2d182b4@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Signed bit field overflow.

You (don't) want "unsigned int botch:1;"

Yuck.

On 5-Jun-07, at 5:36 PM, ron minnich wrote:

> /* catch the bug */
>
> struct x {
>  int botch:1;
> };
>
> fun(){
>  struct x x;
>  x.botch = 0;
>  x.botch = 1;
> }
>
> ok, what's the bug? anyone? I just found this out today. (no, I don't
> use bitfields, but insane people do)
>
> ron

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGZgi1pJeHo/Fbu1wRAk8AAJ9GjwNz6JLxWav33huG68SjB4R1YACfZHNI
BtIRBQPaXw91oj5Am+VDVaU=
=Ai0G
-----END PGP SIGNATURE-----


  parent reply	other threads:[~2007-06-06  1:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06  0:36 ron minnich
2007-06-06  0:43 ` Roman Shaposhnick
2007-06-06  3:41   ` ron minnich
2007-06-06  3:48     ` Roman Shaposhnik
2007-06-06  4:18       ` ron minnich
2007-06-06  4:30         ` Kris Maglione
2007-06-06  4:36           ` Kris Maglione
2007-06-06  7:05             ` Bruce Ellis
2007-06-06  8:15             ` W B Hacker
2007-06-06  1:07 ` Paul Lalonde [this message]
2007-06-06  1:16   ` Roman Shaposhnick
2007-06-06  8:49 ` [9fans] quiz prem
  -- strict thread matches above, loose matches on Subject: below --
2002-05-02  5:55 [9fans] quiz rob pike, esq.

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=2F03E7E9-C7F5-41C6-9E27-462B6B07EE14@telus.net \
    --to=plalonde@telus.net \
    --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).