[patch] tree-vrp.c: Teach VRP that &p->a is nonzero if p is known to be nonzero.
Richard Henderson
rth@redhat.com
Mon May 2 17:04:00 GMT 2005
On Sun, May 01, 2005 at 07:08:30PM -0400, Kazu Hirata wrote:
> One question I have is whether it is safe to ignore the wrapping that
> might happen to a pointer. If I have the following on a 32-bit system
>
> struct s { int a; int b; } *p;
>
> and p is 0xfffffffc, then &p->b could be 0. Should I worry about such
> a case?
No. Pointer arithmetic isn't allowed to wrap. IIRC we assume this
elsewhere, independently of -fwrapv.
r~
More information about the Gcc-patches
mailing list