This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix gcc.c-torture/execute/20000706-3.c for the v850
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: law at redhat dot com
- Cc: Catherine Moore <clm at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 04 May 2002 00:24:49 +0200
- Subject: Re: [patch] Fix gcc.c-torture/execute/20000706-3.c for the v850
- References: <2121.1020463809@porcupine.cygnus.com>
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.