From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <42581047d9bdd824d7f8f43f30636feb@chula.quanstro.net> References: <8f46f79042d0cf94c0309c883a046dd6@brasstown.quanstro.net> <42581047d9bdd824d7f8f43f30636feb@chula.quanstro.net> Date: Tue, 28 Feb 2012 20:22:08 +1100 Message-ID: From: Bruce Ellis To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] 6c bug? Topicbox-Message-UUID: 6502889e-ead7-11e9-9d60-3106f5b1d025 for the example you gave the diagnostic is correct. On 28 February 2012 18:20, erik quanstrom 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 wrote: >> > for p =3D uchar*, Nbus=3D=3D256, >> > >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((uint)p[1] >= =3D Nbus){ >> > >> > generates >> > >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0warning: ./mp.c:212 useless or misleading c= omparison: UCHAR >=3D 0x100 >> > >> > i'm pretty sure that 6c is incorrectly issuing the diagnostic before >> > applying the cast. =C2=A0(the cast is there to shut the compiler up.) > > it is not a given that Nbus >=3D 255. > > - erik > --=20 Don't meddle in the mouth -- MVS (0416935147, +1-513-3BRUCEE)