> Richard Guenther wrote:
> While trying to implement folding of &a +- cst to &a[c] I came
> along the C frontend, which for
> 
>   int a[4];
>   int *p = &a[-1];
>
> produces
>
>   p = &a + (int *)-4;

Would guess it should be:

   p = &a - (int *)4;

or even:

   p = &a + - (int *)4;

Either yielding:

   &a[-4U/4U] from &a[-1]

Which would seem consistent.

(maybe in general negative unsigned values should be represented as a
 unary minus expression with an unsigned argument: (MINUS (CONST unsigned))

-paul-


Reply via email to