[PATCH] fix for PR 59825
Marek Polacek
polacek@redhat.com
Wed Jan 15 22:59:00 GMT 2014
On Wed, Jan 15, 2014 at 10:37:04PM +0000, Iyer, Balaji V wrote:
> +2014-01-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
> +
> + PR c/59825
> + * c-array-notation.c (expand_array_notation_exprs): Added COMPOUND_EXPR
> + case.
> +
"Add"
> --- a/gcc/c/c-array-notation.c
> +++ b/gcc/c/c-array-notation.c
> @@ -1289,6 +1289,15 @@ expand_array_notation_exprs (tree t)
> A[x:y];
> Replace those with just void zero node. */
> t = void_zero_node;
> + return t;
Can't you just return void_zero_node; here?
> + case COMPOUND_EXPR:
> + if (contains_array_notation_expr (t))
> + if (TREE_CODE (TREE_OPERAND (t, 0)) == SAVE_EXPR)
> + {
> + t = expand_array_notation_exprs (TREE_OPERAND (t, 1));
> + return t;
And return expand_array_notation_exprs (TREE_OPERAND (t, 1)); here?
Also, is that if (contains_array_notation_expr (t)) needed? At the
start of the function there's
1229 if (!contains_array_notation_expr (t))
1230 return t;
Marek
More information about the Gcc-patches
mailing list