https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109542

--- Comment #4 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Amos Maimon from comment #3)
> 1. the same will occur if you will do :
> p[0xffffe] = 0xfc;

Yes, it's undefined behavior too as C defines a[b] as *(a+b).

> 2. how do you explin the fact that if the null set in the function
> (SIMPLE_WRITE case) gcc compile it without ud2a

It's an undefined behavior, the compiler can do anything.

Reply via email to