This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR44555
On 16/06/2010 21:47, Dave Korn wrote:
> address from the loaded data item! This happens because the '&' operator is
> really a compile-time operation like sizeof, whereas a dereference is a
> runtime one;
That made me wonder, what does the standard say about "sizeof (*(TYPE
*)NULL)"? It looks to me like it's probably also undefined. On the other
hand, I found a footnote (#87 in n1256, on section 6.5.3.2 para 4) that says
> &*E is equivalent to E (even if E is a null pointer)
so I figure that's more or less precedent for allowing &(A->B) even if A is a
null pointer.
cheers,
DaveK