This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR44555
On 17/06/2010 13:57, Andreas Schwab wrote:
> Dave Korn <dave.korn.cygwin@gmail.com> writes:
>
>> Yes, I was suggesting that the standard could be adjusted to say the same
>> about &((*a).b), that the indirection and address operators are not evaluated
>> there either,
>
> The problematic part is the member selector, which results in a pointer
> that is different from the original null pointer, especially when it's
> not the first member. So the expression cannot fully be a no-op. In
> the &*E case you have two operations that are inverse to each other.
I see what you mean. It would need some fairly twisted logic to argue that
the member-selector operation actually modifies the address-of operator in the
standard's terms, despite that that's how the code ends up being implemented.
But are you objecting to the patch? I think it should be allowed.
cheers,
DaveK