This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New version of sequence point warnings
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: Re: New version of sequence point warnings
- From: Bernd Schmidt <bernds at redhat dot com>
- Date: Fri, 24 Nov 2000 17:45:13 +0000 (GMT)
- cc: gcc-patches at gcc dot gnu dot org
On Fri, 24 Nov 2000, Bernd Schmidt wrote:
>
> * fold-const.c (fold_range_test): Don't crash when lhs or rhs is NULL.
>
> Index: fold-const.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/fold-const.c,v
> retrieving revision 1.140
> diff -u -p -r1.140 fold-const.c
> --- fold-const.c 2000/11/24 11:49:45 1.140
> +++ fold-const.c 2000/11/24 16:26:56
> @@ -3780,6 +3780,7 @@ fold_range_test (exp)
> short-circuited branch and the underlying object on both sides
> is the same, make a non-short-circuit operation. */
> else if (BRANCH_COST >= 2
> + && lhs != 0 && rhs != 0
> && (TREE_CODE (exp) == TRUTH_ANDIF_EXPR
> || TREE_CODE (exp) == TRUTH_ORIF_EXPR)
> && operand_equal_p (lhs, rhs, 0))
Bootstrapped on x86-linux and installed. Franz, I hope things build again
for you now.
Bernd