On Fri, May 16, 2008 at 03:20:34PM -0500, Patrick R. Michaud wrote:
> On Fri, May 16, 2008 at 09:12:19PM +0100, Alberto Simões wrote:
> > Hi, Folks.
> >
> > There are a few files on the parrot source where the compiler complains
> > about a logic value that is always true.
> >
> > Let us check a specific case:
> >
> > on src/jit_emit.h:231,
> >
> > if (!base && !(i && scale) && (!emit_is8bit(disp) || 1)) {
> >
> > This is exactly
> >
> > if (!base && !(i && scale)) {
>
> It's not *exactly* that. The first version executes
> emit_is8bit(disp), while the second one doesn't.
>
> You're correct that the return value of emit_is8bit(disp)
> doesn't appear to matter to the C<if> statement itself.
So shouldn't it be re-written as
if (!base && !(i && scale)) {
emit_is8bit(disp);
?
Nicholas Clark