[patch] Fix gcc.c-torture/execute/20000706-3.c for the v850

Paolo Carlini pcarlini@unitus.it
Fri May 3 15:25:00 GMT 2002


law@redhat.com wrote:

> > !         && (i == 2 || i >= 20 && (i < 30)))
>Where you trying to write
>A || (B && C)
>
>or 
>
>(A || B) && C
>
>It seems to me this should be
>
>  && (i == 2 || i >= 20)
>  && i < 30
>  
>
But i == 2 implies i < 30, therefore:

    && (i == 2 || i >= 20)
    && i < 30

is in fact equivalent to:

    && (i == 2 || i >= 20 && i < 30)

which, in turn, is also equivalent to (with redundant parentheses):

    && (i == 2 || i >= 20 && (i < 30))

right?
Paolo.






More information about the Gcc-patches mailing list