From: Bruce Ellis <bruce.ellis@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 6c bug?
Date: Tue, 28 Feb 2012 20:22:08 +1100 [thread overview]
Message-ID: <CAJQxxwka-EGOgyTV-xBB1YOWTXLzyL=qtRWDkfz0NmD82koFpQ@mail.gmail.com> (raw)
In-Reply-To: <42581047d9bdd824d7f8f43f30636feb@chula.quanstro.net>
for the example you gave the diagnostic is correct.
On 28 February 2012 18:20, erik quanstrom <quanstro@quanstro.net> wrote:
> On Tue Feb 28 02:16:04 EST 2012, bruce.ellis@gmail.com wrote:
>> what values of p[1] do you expect the test to be of use?
>>
>> On 28 February 2012 15:40, erik quanstrom <quanstro@quanstro.net> wrote:
>> > for p = uchar*, Nbus==256,
>> >
>> > if((uint)p[1] >= Nbus){
>> >
>> > generates
>> >
>> > warning: ./mp.c:212 useless or misleading comparison: UCHAR >= 0x100
>> >
>> > i'm pretty sure that 6c is incorrectly issuing the diagnostic before
>> > applying the cast. (the cast is there to shut the compiler up.)
>
> it is not a given that Nbus >= 255.
>
> - erik
>
--
Don't meddle in the mouth -- MVS (0416935147, +1-513-3BRUCEE)
next prev parent reply other threads:[~2012-02-28 9:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 4:40 erik quanstrom
2012-02-28 7:14 ` Bruce Ellis
[not found] ` <CAJQxxw=AN0dUGdu_sbdOc2Vkew3BXWPhvTOAxKKLgjHGxpxVjw@mail.gmail.c>
2012-02-28 7:20 ` erik quanstrom
2012-02-28 9:22 ` Bruce Ellis [this message]
[not found] ` <CAJQxxwka-EGOgyTV-xBB1YOWTXLzyL=qtRWDkfz0NmD82koFpQ@mail.gmail.c>
2012-02-28 18:37 ` 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='CAJQxxwka-EGOgyTV-xBB1YOWTXLzyL=qtRWDkfz0NmD82koFpQ@mail.gmail.com' \
--to=bruce.ellis@gmail.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).