9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: quanstro@quanstro.net (erik quanstrom)
Subject: [9fans] 8c puzzling behavior
Date: Tue,  8 Mar 2011 18:54:45 -0500	[thread overview]
Message-ID: <086333639826ae4c3950b13daaeb23cb@ladd.quanstro.net> (raw)
In-Reply-To: <20110308233230.BD9BCB835@mail.bitblocks.com>

> 1 is signed. 1u is unsigned (see 6.4.4.1). 0x80000000 doesn't
> fit in an int so it is an unsigned int. 0x100000000 won't fit
> in an unsigned int so it will pick the next type in the table
> that is big enough, which is long long int. Nice, eh?!

ah!  i had just forgotten about the "too big to fit into an int,
make unsigned" rule.  it all makes sense, now.  but man is it
annoying to convert code from 32 to 64 bits.

you hear bats. you feel a draft. you smell a wumpus.  ...
ah, that's the c type system.

- erik



  reply	other threads:[~2011-03-08 23:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08 17:16 erik quanstrom
2011-03-08 20:21 ` geoff at plan9.bell-labs.com
2011-03-08 23:32 ` Bakul Shah
2011-03-08 23:54   ` erik quanstrom [this message]
2011-03-09  7:23     ` Charles Forsyth
2011-03-09 13:05       ` erik quanstrom
2011-03-08 17:21 erik quanstrom
2011-03-08 17:43 ` Lucio De Re

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=086333639826ae4c3950b13daaeb23cb@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    /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).