This is the mail archive of the
mailing list for the GCC project.
Re: Aliasing brokenness (Was: Re: [patch RFC] SH: Use FRAME_GROWS_DOWNWARD)
Ian Lance Taylor wrote:
Mark Mitchell <firstname.lastname@example.org> writes:
Mark Mitchell wrote:
That's the rule we've tried to use in GCC, as well; that if "p" and
"q" pointer to distinct types (not part of the same alias set) then
modifying "*p" cannot change the value of "*q", unless both accesses
are directly through a union. I don't know that the front ends and
optimizers are careful about preserving the user's access through
unions, but they could in theory be appropriately careful.
That is, I think 220.127.116.11 is an explicit statement of a restricted form
of the rule you describe in the first paragraph. It does not go
beyond what you described already.
How do you read the "visibility" language? The idea that the visibility
of the union is all that is required seemed to imply a stronger
statement to me.