From: tlaronde@polynum.com
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] BUG!!! in Plan9 compiler!
Date: Thu, 22 Apr 2010 23:26:09 +0200 [thread overview]
Message-ID: <20100422212609.GA2513@polynum.com> (raw)
In-Reply-To: <20100422211551.GA987@polynum.com>
On Thu, Apr 22, 2010 at 11:15:51PM +0200, tlaronde@polynum.com wrote:
>
> I get:
>
> gcc: -201
> ken-cc: 2147483447 (2^31 - 201)
>
> This is: signed long + signed long + unsigned char.
>
> Do you mean that there is first promotion :
>
> 1) unsigned char is promoted to unsigned int (A6.1).
>
> 2) And since there is an arithmetic operator (/ or shift),
> unsigned int value may exceeds signed long == signed int, the
> signed long is converted to unsigned long (A6.2)?
>
> Is it this?!!!!?
>
> And when I do first assignment, there is only promotion (since no
> operator is here). Yielding the correct value in x2, that is then
> divided (or shifted) by 2, hence signed, and no problem?
I say non-sense: even in the assignment, there is still arithmetic
conversions: the '+'...
I don't get it...
--
Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
next prev parent reply other threads:[~2010-04-22 21:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 15:29 tlaronde
2010-04-22 17:03 ` Bakul Shah
2010-04-22 17:36 ` tlaronde
2010-04-22 17:50 ` tlaronde
2010-04-22 19:08 ` geoff
2010-04-22 19:32 ` tlaronde
2010-04-22 20:07 ` Bakul Shah
2010-04-22 21:15 ` tlaronde
2010-04-22 21:26 ` tlaronde [this message]
2010-04-22 22:49 ` Bakul Shah
2010-04-23 7:42 ` tlaronde
2010-04-23 18:53 ` C H Forsyth
2010-04-23 18:51 ` tlaronde
2010-04-23 20:08 ` Bakul Shah
2010-04-23 20:46 ` ron minnich
2010-04-23 21:44 ` erik quanstrom
2010-04-23 22:34 ` erik quanstrom
2010-04-24 18:59 ` Bakul Shah
2010-04-24 21:47 ` Charles Forsyth
2010-04-25 0:31 ` erik quanstrom
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=20100422212609.GA2513@polynum.com \
--to=tlaronde@polynum.com \
--cc=9fans@9fans.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).