This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Correctness question


* Richard Guenther:

> Is it correct for the middle-end to transform
>
> void foo(int i)
> {
>   int a[4];
>   if (&a[i] == &a[2147483648U])
>      abort();
>   if (i == 2147483648U)
>      abort();
> }

Is this valid C?  I doubt that even a + 5 is a valid expression (a + 4
is okay, though).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]