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

--- Comment #11 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #10)
> int f(int *a)
> {
>   int b;
>   size_t t = (size_t)&b;
>   size_t t1 = (size_t)a;
>   return *(int*)(((size_t)&b)+(t-t1));
> }
> 
> Is kinda of valid c but might fail with your definition.

The result of integer-to-pointer conversion is implementation-defined, so it's
not necessarily valid if the implementation has segmented memory.

Reply via email to